emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in filelock.c


From: Paul Eggert
Subject: Re: Bug in filelock.c
Date: Sat, 23 Feb 2013 16:25:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 02/23/2013 01:59 PM, Andreas Schwab wrote:
> It worked perfectly well until about 8 months ago.

Thanks, I installed the following patch to the emacs-24 branch
and I assume this fix will propagate into the trunk.

I still don't see the need for that extra business with
using '.#FOO.1' as the lock file name if a file '.#FOO' happens
to exist and is not a symbolic link.  How about if we remove
that stuff (in the trunk)?  Isn't it a waste of a system call for
something nobody should need?

----

Fix regression introduced by July 10 filelock.c patch.
* filelock.c (fill_in_lock_file_name): Fix crash caused by the
2012-07-10 patch to this file.  Reported by Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html>
and diagnosed by Andreas Schwab in
<http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
=== modified file 'src/filelock.c'
--- src/filelock.c      2013-01-01 09:11:05 +0000
+++ src/filelock.c      2013-02-24 00:16:45 +0000
@@ -316,7 +316,7 @@
   p[1] = '.';
   p[2] = '#';

-  p = p + length + 2;
+  p = lockfile + length + 2;

   while (lstat (lockfile, &st) == 0 && !S_ISLNK (st.st_mode))
     {





reply via email to

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