bug-findutils
[Top][All Lists]
Advanced

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

[patch #9705] make ftsfind honour the -ignore_readdir_race option


From: Gajendran Kanapathipillai
Subject: [patch #9705] make ftsfind honour the -ignore_readdir_race option
Date: Mon, 15 Oct 2018 12:58:27 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299

Follow-up Comment #2, patch #9705 (project findutils):

Actually, with the ftsfind, the test never gets to the code where earlier
patch (0afb2efad) is fixing the issue.  Instead, the ftsfind errors early and
sets the errno to "1".  Which causes the "-ignore_readdir_race -delete"
combination to still fail and return error.

The patch attached prevents the ftsfind to error early and and set the errno
to 1, so the original patch (0afb2efad) is reached and handled correctly.

Here's the test loop output without the attahed patch:

consider_visiting (early): ‘./6’: fts_info=FTS_F , fts_level= 1,
prev_depth=1 fts_path=‘./6’, fts_accpath=‘6’
consider_visiting (late): ‘./6’: fts_info=FTS_F , isdir=0 ignore=0
have_stat=1 have_type=1 
removed ‘7’
removed ‘8’
removed ‘9’
removed ‘10’
find deleted: ./6
consider_visiting (early): ‘./7’: fts_info=FTS_NS, fts_level= 1,
prev_depth=1 fts_path=‘./7’, fts_accpath=‘7’
/bin/find: ‘./7’: No such file or directory
consider_visiting (late): ‘./7’: fts_info=FTS_NS, isdir=0 ignore=0
have_stat=0 have_type=0




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?9705>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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