mirror of
git://git.sv.gnu.org/findutils.git
synced 2026-01-27 12:13:22 +01:00
* find/pred.c (pred_delete): Return true when the -ignore_readdir_race
option is active and unlinkat() came back with ENOENT.
* doc/find.texi (Option -ignore_readdir_race): Document the change.
(Action -delete): Likewise.
* find/find.1: Likewise.
* NEWS (Bug Fixes): Mention the fix.
For now, it seems a bit hard to add a proper test for this,
so the following shell snippet demonstrates the race:
$ seq 10 | xargs touch
$ env time -f 'find exit status: %x\nfind time: %e' \
find -ignore_readdir_race -type f \
-delete \
-exec sh -c 'sleep $(basename {})' \; \
-printf 'find deleted: %p\n' \
& \
sleep 20; \
seq 10 | xargs rm -fv; \
wait $!
Reported by Alexander Golubev in
https://savannah.gnu.org/bugs/?52981