all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13807@debbugs.gnu.org
Subject: bug#13807: updated version to avoid MS-Windows vs non-MS-Windows clashes
Date: Sat, 02 Mar 2013 12:43:05 -0800	[thread overview]
Message-ID: <51326459.4030001@cs.ucla.edu> (raw)
In-Reply-To: <83txoxwq0p.fsf@gnu.org>

On 02/27/2013 10:49 AM, Eli Zaretskii wrote:

> The results were that when Emacs running on GNU/Linux had the file
> locked, Emacs running on Windows would refrain from locking it, and
> vice versa when the file was locked by Emacs running on Windows and
> a GNU/Linux Emacs would try to lock it.

Unfortunately when (for example) the GNU/Linux Emacs refrained from
locking the file, what it was actually doing was using its own
separate lock file, whose name it got in a buggy way.  That is, when
locking FILE it discovered a regular file .#FILE (the MS-Windows lock
file) and then decided to use a symlink .#FILE.0, thus ignoring the
MS-Windows lock.

The process of guessing a lock file name by appending ".0" is
obviously flaky, as it's prone to races.  The recent MS-Windows
changes have made the races more likely, but they were present even
before the changes.  Emacs should not guess the lock file name.

For now, I've installed the patch as trunk bzr 111918, as it fixes these
races.  This patch causes Emacs to use a different lock file name
.#-FILE for MS-Windows than the usual lock file .#FILE for GNU/Linux,
which is not good, but Emacs was using different lock files anyway,
and a virtue of the patch is that any problems in the MS/Windows
implementation won't get in the way of GNU/Linux users on a networked
file system.

I will look into adjusting Emacs so that it uses the same lock file
name .#FILE for both GNU/Linux and MS-Windows, which would be nicer
than the patched Emacs.  This will take some more thought, though.






  reply	other threads:[~2013-03-02 20:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24 22:48 bug#13807: The lock for 'DIR/FILE' should always be 'DIR/.#FILE' Paul Eggert
2013-02-25 19:57 ` Glenn Morris
2013-02-25 23:40   ` Paul Eggert
2013-02-26 22:19 ` bug#13807: updated version to avoid MS-Windows vs non-MS-Windows clashes Paul Eggert
2013-02-27 18:49   ` Eli Zaretskii
2013-03-02 20:43     ` Paul Eggert [this message]
2013-03-02 21:17       ` Eli Zaretskii
2013-03-02 22:37         ` Paul Eggert
2013-03-03 16:39           ` Eli Zaretskii
2013-03-03 23:56             ` Paul Eggert
2013-03-04 16:50               ` Eli Zaretskii
2013-03-05  2:25                 ` Paul Eggert
2013-03-05 18:38                   ` Eli Zaretskii
2013-03-05 22:38                     ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51326459.4030001@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=13807@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.