aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPaul Eggert2017-08-25 12:44:52 -0700
committerPaul Eggert2017-08-25 13:19:45 -0700
commit2b7e009257a40ef1dcad9845fe61764fea08cdea (patch)
tree416594c77bd7b015763726f48ee160e25a47fa61 /etc
parent9a223dab9036ff72b16e7a9878af090c041fd0c6 (diff)
downloademacs-2b7e009257a40ef1dcad9845fe61764fea08cdea.tar.gz
emacs-2b7e009257a40ef1dcad9845fe61764fea08cdea.zip
Fix file-attributes race on GNU hosts
* 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.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index bf59749a62b..02de66b355f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1428,6 +1428,12 @@ job of signaling list cycles instead of looping indefinitely.
1428can be used for creation of temporary files of remote or mounted directories. 1428can be used for creation of temporary files of remote or mounted directories.
1429 1429
1430+++ 1430+++
1431** On GNU platforms when operating on a local file, 'file-attributes'
1432no longer suffers from a race when called while another process is
1433altering the filesystem. On non-GNU platforms 'file-attributes'
1434attempts to detect the race, and returns nil if it does so.
1435
1436+++
1431** The new function 'file-local-name' can be used to specify arguments 1437** The new function 'file-local-name' can be used to specify arguments
1432of remote processes. 1438of remote processes.
1433 1439