From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#13807: updated version to avoid MS-Windows vs non-MS-Windows clashes Date: Sat, 02 Mar 2013 12:43:05 -0800 Organization: UCLA Computer Science Department Message-ID: <51326459.4030001@cs.ucla.edu> References: <512A98D5.7080000@cs.ucla.edu> <512D3508.1000906@cs.ucla.edu> <83txoxwq0p.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1362257042 8425 80.91.229.3 (2 Mar 2013 20:44:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Mar 2013 20:44:02 +0000 (UTC) Cc: 13807@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 02 21:44:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UBtI7-0004Rk-7o for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Mar 2013 21:44:23 +0100 Original-Received: from localhost ([::1]:49368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBtHm-0001kB-1E for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Mar 2013 15:44:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBtHi-0001jv-BA for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2013 15:43:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBtHh-0007mx-B5 for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2013 15:43:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBtHh-0007mt-8D for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2013 15:43:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UBtHm-0000E8-27 for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2013 15:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Mar 2013 20:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13807 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13807-submit@debbugs.gnu.org id=B13807.1362257004819 (code B ref 13807); Sat, 02 Mar 2013 20:44:01 +0000 Original-Received: (at 13807) by debbugs.gnu.org; 2 Mar 2013 20:43:24 +0000 Original-Received: from localhost ([127.0.0.1]:55873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBtH8-0000D9-OX for submit@debbugs.gnu.org; Sat, 02 Mar 2013 15:43:23 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:59549) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBtH4-0000Cu-1D for 13807@debbugs.gnu.org; Sat, 02 Mar 2013 15:43:21 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 004CCA6000F; Sat, 2 Mar 2013 12:43:06 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WRjbIZH9TC29; Sat, 2 Mar 2013 12:43:06 -0800 (PST) Original-Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9608EA6000E; Sat, 2 Mar 2013 12:43:06 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 In-Reply-To: <83txoxwq0p.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72034 Archived-At: 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.