bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26349: Option -ignore_readdir_race does not work with program `find`


From: Dariusz Dzialak
Subject: bug#26349: Option -ignore_readdir_race does not work with program `find`
Date: Mon, 3 Apr 2017 16:18:08 +0200

Program 'find' failed even -ignore_readdir_race  (no *OK* in output):

> mkdir -p 1/2/bla 3/4/bla ; { find . -ignore_readdir_race -mindepth 1
-name '[0-9]' -print -exec stat --format "%s %n" {} \; -exec sleep 0.5 \;
&& echo OK; } & sleep .2 ; rm -fr 1 3 ; wait
[1] 25831
./3
4096 ./3
find: `./3': No such file or directory
./1
stat: cannot stat ‘./1’: No such file or directory
[1]+  Exit 1                  { find . -ignore_readdir_race -mindepth 1
-name '[0-9]' -print -exec stat --format "%s %n" {} \; -exec sleep 0.5 \;
&& echo OK; }


Program `find` succeed even -noignore_readdir_race but with -depth option:

> mkdir -p 1/2/bla 3/4/bla ; { find . -depth -noignore_readdir_race
-mindepth 1 -name '[0-9]' -print -exec stat --format "%s %n" {} \; -exec
sleep 0.5 \; && echo OK; } & sleep .2 ; rm -fr 1 3 ; wait
[1] 25854
./3/4
4096 ./3/4
./3
stat: cannot stat ‘./3’: No such file or directory
./1
stat: cannot stat ‘./1’: No such file or directory
*OK*
[1]+  Done                    { find . -depth -noignore_readdir_race
-mindepth 1 -name '[0-9]' -print -exec stat --format "%s %n" {} \; -exec
sleep 0.5 \; && echo OK; }



================

> uname -a
Linux w-92 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux

> find --version
find (GNU findutils) 4.4.2
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Built using GNU gnulib version e5573b1bad88bfabcda181b9e0125fb0c52b7d3b
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS()
CBO(level=0)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]