URL:
<https://savannah.gnu.org/patch/?9705>
Summary: make ftsfind honour the -ignore_readdir_race option
Project: findutils
Submitted by: gajendrank
Submitted on: Mon 15 Oct 2018 03:25:13 PM UTC
Category: find bugfix
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
In the ftsfind, the ignore_readdir_race is not considered when the file goes
missing. Please refer to the following fix for the issue and how this patch
was tested:
commit 0afb2efada7e435ae18ef7d3db0758464189f44f
Author: Bernhard Voelker <[email protected]>
Date: Tue Jan 30 23:30:09 2018 +0100
find: make -delete honour the -ignore_readdir_race option
* 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
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 15 Oct 2018 03:25:13 PM UTC Name:
0001-find-make-ftsfind-honour-the-ignore_readdir_race-opt.patch Size: 791B
By: gajendrank
<http://savannah.gnu.org/patch/download.php?file_id=45201>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9705>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/