bug#10305: coreutils-8.14, "rm -r" fails with EBADF
From:
Eric Blake
Subject:
bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date:
Wed, 21 Dec 2011 11:52:27 -0700
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0
On 12/21/2011 11:42 AM, Paul Eggert wrote:
> On 12/21/11 08:27, Eric Blake wrote:
>> maybe we should wrap opendir() so that the gnulib rpl_opendir()
>> always opens a directory at the same time
>
> That sounds a bit drastic, but it may be necessary.
>
> How about this idea instead? Use the following patch,
> so that fts_build does not assume that dirfd works.
>
> POSIX does not require dirfd to work,
Actually, the next version of POSIX _will_ require dirfd to work, so we
may have to go with wrapping rpl_opendir anyways:
http://austingroupbugs.net/view.php?id=391
But you are correct that older systems do not meet the future POSIX
wording, so if your hack works, it's certainly simpler for the short term.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc Description: OpenPGP digital signature