emacs-devel
[Top][All Lists]
Advanced

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

Re: Locking files for CLASH_DETECTION now supported on MS-Windows


From: Eli Zaretskii
Subject: Re: Locking files for CLASH_DETECTION now supported on MS-Windows
Date: Wed, 27 Feb 2013 06:01:44 +0200

> Date: Tue, 26 Feb 2013 14:34:29 -0800
> From: Paul Eggert <address@hidden>
> CC: address@hidden
> 
> On 02/26/13 10:17, Eli Zaretskii wrote:
> 
> > We could avoid this by teaching Emacs on Posix systems to
> > read lock files created by Emacs running on Windows.
> 
> I don't see how to do this without introducing race
> conditions that are not present in the current GNU/Linux
> implementation.

Can you describe those race conditions?  I'm talking only about
_reading_ those files, not about creating them.  If two instances of
Emacs read the same lock file (created by an instance running on
Windows), they will both see that the file exists and will both read
the same contents.

> > We could also strengthen this by considering a file locked
> > just because the .#FOO lockfile exists
> 
> Other applications (i.e., not GNU Emacs) create regular
> files .#FOO, and Emacs shouldn't be impeded from editing FOO
> merely because some other application has created .#FOO.

??? The changes you are promoting cause Emacs to take control of any
file whose name matches the pattern .#FILE, where FILE is the file we
edit.  How is that different from what I propose?

> (We could try to parse .#FOO but this leads to races.)

None of the races that doesn't already exist.

> > Another possibility would be to make Emacs running on Windows avoid
> > locking files on remote filesystems.
> 
> Won't there still be a problem if the local file system is
> exported?

No, because such exported systems will not support symlinks from Posix
hosts.

> To move things forward, I propose that the MS-Windows
> implementation use a different lock file name .#-FOO.

I don't mind, but I thought we could do better.



reply via email to

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