diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-08-25 12:44:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-08-25 13:19:45 -0700 |
commit | 2b7e009257a40ef1dcad9845fe61764fea08cdea (patch) | |
tree | 416594c77bd7b015763726f48ee160e25a47fa61 /src/sysdep.c | |
parent | 9a223dab9036ff72b16e7a9878af090c041fd0c6 (diff) | |
download | emacs-2b7e009257a40ef1dcad9845fe61764fea08cdea.tar.gz emacs-2b7e009257a40ef1dcad9845fe61764fea08cdea.tar.bz2 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 'src/sysdep.c')
-rw-r--r-- | src/sysdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 12e9c83ee90..b66a7453172 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2930,7 +2930,7 @@ list_system_processes (void) process. */ procdir = build_string ("/proc"); match = build_string ("[0-9]+"); - proclist = directory_files_internal (procdir, Qnil, match, Qt, 0, Qnil); + proclist = directory_files_internal (procdir, Qnil, match, Qt, false, Qnil); /* `proclist' gives process IDs as strings. Destructively convert each string into a number. */ |