From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43535: File locking on Windows Date: Sun, 20 Sep 2020 19:14:19 +0300 Message-ID: <83d02gzaqs.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28919"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43535@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 20 18:15:18 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kK1zh-0007P8-Ho for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Sep 2020 18:15:17 +0200 Original-Received: from localhost ([::1]:43284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kK1zg-0005AA-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Sep 2020 12:15:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kK1zS-00059I-91 for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2020 12:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kK1zR-0007E9-Ur for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2020 12:15:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kK1zR-00059O-O6 for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2020 12:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Sep 2020 16:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43535 X-GNU-PR-Package: emacs Original-Received: via spool by 43535-submit@debbugs.gnu.org id=B43535.160061846819741 (code B ref 43535); Sun, 20 Sep 2020 16:15:01 +0000 Original-Received: (at 43535) by debbugs.gnu.org; 20 Sep 2020 16:14:28 +0000 Original-Received: from localhost ([127.0.0.1]:52467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK1yu-00058K-1K for submit@debbugs.gnu.org; Sun, 20 Sep 2020 12:14:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK1yr-000588-VG for 43535@debbugs.gnu.org; Sun, 20 Sep 2020 12:14:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36830) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kK1ym-0007BG-Nc; Sun, 20 Sep 2020 12:14:20 -0400 Original-Received: from [176.228.60.248] (port=1942 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kK1ym-0007LG-2v; Sun, 20 Sep 2020 12:14:20 -0400 In-Reply-To: (message from Richard Copley on Sun, 20 Sep 2020 16:54:56 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188514 Archived-At: > From: Richard Copley > Date: Sun, 20 Sep 2020 16:54:56 +0100 > > This is quite a cruel punishment for an understandable mistake. I > assume it started happening when Paul fixed the error handling in > "filelock.c". It happens on master and Emacs 27.2, and not on Emacs > 26.3. > > There is more than one conceivable way to avoid this. E.g., use a > different lock file name, keep the lock file open in deny-share mode > to prevent accidents, ignore certain errors while unlocking. I think ignoring errors, perhaps after asking for confirmation, is the only way. Using a different file name will just move the problem elsewhere, and keeping the file open will disallow stealing the lock, and on MS-Windows will have other annoying effects (like keeping the file's directory busy etc.).