summaryrefslogtreecommitdiff
path: root/etc/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-03-02 12:41:53 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-03-02 12:41:53 -0800
commitb5029e230d10ea412e4ff1d4867a0c884d130039 (patch)
tree98c424b27b043f8289e215d06ec6a09de6c7e2c3 /etc/ChangeLog
parent06b583dec7cbde714c8fb991a1e123f612b66e3a (diff)
downloademacs-b5029e230d10ea412e4ff1d4867a0c884d130039.tar.gz
The lock for FILE is now .#FILE or .#-FILE.
The old approach, which fell back on DIR/.#FILE.0 through DIR/.#FILE.9, had race conditions that could not be easily fixed. If DIR/.#FILE is a non-symlink file, Emacs now does not create a lock file for DIR/FILE; that is, DIR/FILE is no longer partly protected by a lock if DIR/.#FILE is a non-symlink file ("partly" because the locking mechanism was never reliable in that case). This patch fixes this and other bugs discovered by a code inspection that was prompted by <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>. Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows, to avoid interoperability problems between the MS-Windows and non-MS-Windows implementations. MS-Windows and non-MS-Windows instances of Emacs now ignore each others' locks. * etc/NEWS: Document this. * src/filelock.c (defined_WINDOWSNT): New constant. (MAKE_LOCK_NAME, fill_in_lock_file_name): Don't create DIR/.#FILE.0 through DIR/.#FILE.9. Instead, create DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE regular files on MS-Windows hosts. (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p): Use SAFE_ALLOCA to avoid problems with long file names. (MAX_LFINFO): Now a local constant, not a global macro. (IS_LOCK_FILE): Remove. (lock_file_1): Don't inspect errno if symlink call succeeds; that's not portable. (lock_file): Document that this function can return if lock creation fails. Fixes: debbugs:13807
Diffstat (limited to 'etc/ChangeLog')
-rw-r--r--etc/ChangeLog4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index a13ab60be36..7ebb2a751ab 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: The lock for FILE is now .#FILE or .#-FILE (Bug#13807).
+
2013-03-01 Michael Albinus <michael.albinus@gmx.de>
* NEWS: Fix Tramp "adb" entry. Extend list of discontinued Tramp