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

From: Paul Eggert <[email-masked]>
Date: Thu, 15 Dec 2011 10:06:55 -0800

On 12/15/11 08:28, Jim Meyering wrote:
> If you can debug it further to narrow down what/how it is failing,
> eventually we'll find the cause.

One way to do that might be to put a breakpoint on all the following
functions, and to let us know what their arguments are when called,
and what they return.  You also might try to compile coreutils
with debugging turned off, so that functions aren't inlined.

diropen
fts_build
fts_safe_changedir
restore_initial_cwd
fchdir
cwd_advance_fd