• Paul Eggert's avatar
    Fix file-attributes race on GNU hosts · 2b7e0092
    Paul Eggert authored
    * doc/lispref/files.texi (File Attributes):
    Document file-attributes atomicity.
    * etc/NEWS: Document the fix.
    * src/dired.c (file_attributes): New args DIRNAME and FILENAME,
    for diagnostics.  All callers changed.  On platforms like
    GNU/Linux that support O_PATH, fix a race condition in
    file-attributes and similar functions, so that these functions do
    not return nonsense if a directory entry is replaced while getting
    its attributes.  On non-GNU platforms, do a better (though not
    perfect) job of detecting the race, and return nil if detected.
    2b7e0092
dired.c 34.1 KB