[bug #45930] -ignore_readdir_race ineffective in find 4.5.11 and 4.5.14
Martin Schwenke <[email protected]>
| Newsgroups | gmane.comp.gnu.findutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Follow-up Comment #12, bug #45930 (group findutils):
[comment #10 comment #10:]
>> gnulib/lib/ftc.c (FTC)
>
> Do you mean FTS?
Yes, oops! Brain overload. :-(
>> This means that when find recurses into a subdirectory, it complains when
>> that subdirectory doesn't exist.
>
> Ah, you mean something like this:
>
> $ mkdir -p foo
> $ find -ignore_readdir_race -name . -o -name foo -print -exec rmdir {} \; -o
> -prune
> ./foo
> find: ‘./foo’: No such file or directory
>
> Actually this is fixable in ftsfind.c. ignore_readdir_race is already
> handled for FTS_NS, it just has to be added to FTS_DNR as well.
I actually mean the case where something else is independently updating the
directory, creating and removing subdirectories. This is similar to the /proc
case but can be recreated with:
$ while :; do mkdir findtest/foo; rmdir findtest/foo; done &
[1] 776
$ while :; do find findtest -ignore_readdir_race; done >/dev/null
find: ‘findtest/foo’: No such file or directory
find: ‘findtest/foo’: No such file or directory
find: ‘findtest/foo’: No such file or directory
find: ‘findtest/foo’: No such file or directory
find: ‘findtest/foo’: No such file or directory
find: ‘findtest/foo’: No such file or directory
^C
$ kill %1
[1]+ Terminated while :; do
mkdir findtest/foo; rmdir findtest/foo;
done
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?45930>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ2IBywAKCRCqLAuaBUf3 TuhbAQC8dzAivefilrMj8AnrVkWCaQ7VNRQ+vVFTN8T7lMqhZAEAl3TKLUGkBKoe j1zbpS9rzbhp/jJZVggXh/sI93ftfA8= =jmlX -----END PGP SIGNATURE-----