From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Locking files for CLASH_DETECTION now supported on MS-Windows Date: Wed, 27 Feb 2013 06:01:44 +0200 Message-ID: <83zjyqwgk7.fsf@gnu.org> References: <83wqtwi90o.fsf@gnu.org> <512BA7F6.4010304@cs.ucla.edu> <83txp0i6cy.fsf@gnu.org> <512BB3C1.40201@cs.ucla.edu> <834ngzhrdf.fsf@gnu.org> <512D3875.5020307@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1361937714 8129 80.91.229.3 (27 Feb 2013 04:01:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2013 04:01:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 05:02:17 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UAYDf-0001HN-3i for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2013 05:02:15 +0100 Original-Received: from localhost ([::1]:46102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAYDK-00027i-BU for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 23:01:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAYDH-00026y-Im for emacs-devel@gnu.org; Tue, 26 Feb 2013 23:01:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAYDG-0001t4-6Z for emacs-devel@gnu.org; Tue, 26 Feb 2013 23:01:51 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:37173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAYDF-0001st-V8 for emacs-devel@gnu.org; Tue, 26 Feb 2013 23:01:50 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MIV00C001K23X00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Wed, 27 Feb 2013 06:01:47 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MIV00BXQ1UZYE90@a-mtaout21.012.net.il>; Wed, 27 Feb 2013 06:01:47 +0200 (IST) In-reply-to: <512D3875.5020307@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157416 Archived-At: > Date: Tue, 26 Feb 2013 14:34:29 -0800 > From: Paul Eggert > CC: emacs-devel@gnu.org > > 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.