From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Locking files for CLASH_DETECTION now supported on MS-Windows Date: Mon, 25 Feb 2013 18:43:16 -0800 Message-ID: <512C2144.5080704@dancol.org> References: <83wqtwi90o.fsf@gnu.org> <512BA7F6.4010304@cs.ucla.edu> <83txp0i6cy.fsf@gnu.org> <512BB3C1.40201@cs.ucla.edu> <512C17E1.7040307@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2HJUKIDNPMWTHIJSDHUCN" X-Trace: ger.gmane.org 1361846618 6000 80.91.229.3 (26 Feb 2013 02:43:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 02:43:38 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 26 03:43:59 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 1UAAWK-000454-33 for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 03:43:56 +0100 Original-Received: from localhost ([::1]:33067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAAVz-0000eS-D9 for ged-emacs-devel@m.gmane.org; Mon, 25 Feb 2013 21:43:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAAVt-0000WN-C1 for emacs-devel@gnu.org; Mon, 25 Feb 2013 21:43:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAAVr-0007HC-Ts for emacs-devel@gnu.org; Mon, 25 Feb 2013 21:43:29 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:36695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAAVr-0007GS-Nb for emacs-devel@gnu.org; Mon, 25 Feb 2013 21:43:27 -0500 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[0.0.0.0]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1UAAVk-00080Z-Cv; Mon, 25 Feb 2013 18:43:20 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <512C17E1.7040307@cs.ucla.edu> X-Enigmail-Version: 1.5 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:157366 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2HJUKIDNPMWTHIJSDHUCN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2/25/2013 6:03 PM, Paul Eggert wrote: > One other thought. Part of the reason GNU/POSIXish hosts use > symbolic links is that readlink, symlink and unlink > are atomic operations. They let Emacs atomically create > a lock, test whether a lock exists, and remove a lock. This > doesn't seem to be true of the new MS-Windows implementation, > which uses open+write+close to create a lock and open+read+close > to test whether a lock exists, neither of which is atomic. > Is there some way this can be done atomically on MS-Windows? >=20 > Are readlink, symlink, and unlink atomic on MS-Windows? Why would they have to be? File creation is atomic. File deletion is atom= ic. The lock is signaled by the presence of the file, right? Why would anything e= lse matter? ------enig2HJUKIDNPMWTHIJSDHUCN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Cygwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlEsIUYACgkQ17c2LVA10VsI6ACgnFnYv1p0TJHk0qWIjbvyrlcQ hKsAoLnng7daBUV3DrleMI2kzZMNMJVs =PqTb -----END PGP SIGNATURE----- ------enig2HJUKIDNPMWTHIJSDHUCN--