Subject: bug#10305: coreutils-8.14, "rm -r" fails with EBADF

From: "Joachim Schmitz" <[email-masked]>
Date: Thu, 15 Dec 2011 15:05:15 +0100

Hi folks

I got coreutils-8.9, 8.13 and 8.14 to compile for my platform, and most of
the utilities work, but as soon as it comes to recurring thru the file
system some utils fail, e.g.:

~/coreutils-8.14/src $ ./rm -R /tmp/foo

./rm: traversal failed: `/tmp/foo': Bad file descriptor

~/coreutils-8.14/src $ ./rm -r /tmp/foo

./rm: traversal failed: `/tmp/foo': Bad file descriptor

~/coreutils-8.14/src $

'./ls -R /tmp/foo' does work though:

~/coreutils-8.14/src $ ./ls -lr /tmp/foo

total 0

-rw-rw-r-- 1 jojo ITUGLIB 0 Dec 15 08:06 bar

Does this ring a bell with one of you?

I don't understand why one fails but the other works, and can't seem to fine
the place where it goes wrong.

It seems to happen somewhere deep in gnulib, but I'm not really sure.

Bye, Jojo