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: Tue, 26 Feb 2013 14:19:52 -0800 Message-ID: <512D3508.1000906@cs.ucla.edu> References: <512A98D5.7080000@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060106060008000500000000" X-Trace: ger.gmane.org 1361917231 29070 80.91.229.3 (26 Feb 2013 22:20:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 22:20:31 +0000 (UTC) To: 13807@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 26 23:20:54 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 1UAStE-0000VS-V9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Feb 2013 23:20:49 +0100 Original-Received: from localhost ([::1]:57225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UASsu-0004jg-4K for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Feb 2013 17:20:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UASsn-0004hi-14 for bug-gnu-emacs@gnu.org; Tue, 26 Feb 2013 17:20:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UASsi-0000rT-FJ for bug-gnu-emacs@gnu.org; Tue, 26 Feb 2013 17:20:20 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UASsi-0000rK-AU for bug-gnu-emacs@gnu.org; Tue, 26 Feb 2013 17:20:16 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UASuP-0007uW-Uz for bug-gnu-emacs@gnu.org; Tue, 26 Feb 2013 17:22:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <512A98D5.7080000@cs.ucla.edu> Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Feb 2013 22:22: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.136191730530378 (code B ref 13807); Tue, 26 Feb 2013 22:22:01 +0000 Original-Received: (at 13807) by debbugs.gnu.org; 26 Feb 2013 22:21:45 +0000 Original-Received: from localhost ([127.0.0.1]:51754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UASu8-0007tt-Pe for submit@debbugs.gnu.org; Tue, 26 Feb 2013 17:21:45 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:40743) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UASu5-0007tj-Ap for 13807@debbugs.gnu.org; Tue, 26 Feb 2013 17:21:43 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D473139E8106 for <13807@debbugs.gnu.org>; Tue, 26 Feb 2013 14:19:53 -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 3D4T3A2Q-AkD for <13807@debbugs.gnu.org>; Tue, 26 Feb 2013 14:19:52 -0800 (PST) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B54BC39E8008 for <13807@debbugs.gnu.org>; Tue, 26 Feb 2013 14:19:52 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 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:71868 Archived-At: This is a multi-part message in MIME format. --------------060106060008000500000000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Attached is an updated version of the patch, which avoids several of the problems mentioned, by using a different lock file name on MS-Windows. Non-MS-Windows uses .#FILE symlinks as before; MS-Windows uses .#-FILE regular files. This avoids clashes between the two approaches. It also means MS-Windows ignores non-MS-Windows locks and vice versa, but given all the inherent incompatibilities involved this may be the best that we can do reliably. --------------060106060008000500000000 Content-Type: text/plain; charset=us-ascii; name="filelock.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="filelock.txt" PT09IG1vZGlmaWVkIGZpbGUgJ2V0Yy9DaGFuZ2VMb2cnCi0tLSBldGMvQ2hhbmdlTG9nCTIw MTMtMDItMjUgMTc6MDE6NDEgKzAwMDAKKysrIGV0Yy9DaGFuZ2VMb2cJMjAxMy0wMi0yNiAy MTo1NToyMSArMDAwMApAQCAtMSwzICsxLDcgQEAKKzIwMTMtMDItMjYgIFBhdWwgRWdnZXJ0 ICA8ZWdnZXJ0QGNzLnVjbGEuZ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yID4gMCkKICAgICBGUkVFX0xPQ0tfSU5GTyAobG9j a2VyKTsKIAorICBTQUZFX0ZSRUUgKCk7CiAgIHJldHVybiByZXQ7CiB9CiAK --------------060106060008000500000000--