GNU bug report logs - #10305
coreutils-8.14, "rm -r" fails with EBADF

Previous Next

Package: coreutils;

Reported by: "Joachim Schmitz" <jojo <at> schmitz-digital.de>

Date: Thu, 15 Dec 2011 14:08:01 UTC

Severity: wishlist

Tags: notabug

Full log


View this message in rfc822 format

From: "Joachim Schmitz" <jojo <at> schmitz-digital.de>
To: "'Eric Blake'" <eblake <at> redhat.com>
Cc: 10305 <at> debbugs.gnu.org, 'Paul Eggert' <eggert <at> cs.ucla.edu>, bug-gnulib <at> gnu.org, 'Jim Meyering' <jim <at> meyering.net>
Subject: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Thu, 22 Dec 2011 09:41:17 +0100
> From: Eric Blake [mailto:eblake <at> redhat.com]
> Sent: Wednesday, December 21, 2011 6:32 PM
> To: Joachim Schmitz
> Cc: 'Jim Meyering'; 10305 <at> debbugs.gnu.org; 'Paul Eggert'; bug-
> gnulib <at> gnu.org
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 12/21/2011 10:12 AM, Joachim Schmitz wrote:
> >>> Write a small test program that opens say four directories, to get
> >>> one
> >>> DIR* pointer for each.  Then print a table of the DIR member values.
> >>> Maybe you'll see a pattern, i.e., how to derive an FD number from
> >>> those dd1,2,3 fields.
> >
> > Yes, indeed, thanks for that idea (should have been mine):
> > It got to be dd1, only it is not an fd but something called fnum and
> > these a) start counting with 1 rather than 0 and b) have 1 and 2 being
> > root and CPD, followed by 3,4 and 5 being stdin, stdout, stderr... it
> > seems fnum -3 == fd
> 
> Yay - we can implement dirfd() in terms of dd1-3.
> 
> Please try this on coreutils:
> 
> ./configure gl_cv_sys_dir_fd_member_name='dd1-3'

I tried something to a similar effect, I manually changed config.h accordingly (see other email of mine) and rebuilt dirfd.o, rebuilt libcoreutils.a, relinked rm:
Didn't work :-(

In case it matters: I'm using 
./configure --prefix=/usr/local --enable-install-program=arch,hostname --without-gmp CFLAGS="-O0 -g"

Another attempt with adding gl_cv_sys_dir_fd_member_name='dd1-3':
Unfortunatly it doesn't help

Bye, Jojo





This bug report was last modified 12 years and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.