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 11:25:14 -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

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 <address@hidden>
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/




reply via email to

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