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#70415: 30.0.50; [Cygwin] `lock-file' creates a symlink with funny name Date: Sat, 04 May 2024 20:25:56 +0300 Message-ID: <867cg9fpzv.fsf@gnu.org> References: <861q75juvy.fsf@gnu.org> <86zftsgoxt.fsf@gnu.org> <86frv3r32m.fsf@gnu.org> <3a7eea72-d4ab-4fde-bdad-71b5e8f5bb7f@cornell.edu> <86le4uq0tj.fsf@gnu.org> <26ab8055-1da6-4b3e-a65c-68c598cb7660@cornell.edu> <86zft8n37z.fsf@gnu.org> <618931e0-ad26-4d07-b9c6-8563831a9fb8@cornell.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18631"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 19:26:56 2024 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 1s3J9z-0004c9-O1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 19:26:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3J9q-0000i3-1M; Sat, 04 May 2024 13:26:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3J9j-0000gn-Nt for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 13:26:40 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3J9j-0007oO-Et for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 13:26:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3JA6-0006MT-GY for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 13:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2024 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70415 X-GNU-PR-Package: emacs Original-Received: via spool by 70415-submit@debbugs.gnu.org id=B70415.171484359324437 (code B ref 70415); Sat, 04 May 2024 17:27:02 +0000 Original-Received: (at 70415) by debbugs.gnu.org; 4 May 2024 17:26:33 +0000 Original-Received: from localhost ([127.0.0.1]:54817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3J9d-0006M5-7j for submit@debbugs.gnu.org; Sat, 04 May 2024 13:26:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3J9a-0006Lx-HR for 70415@debbugs.gnu.org; Sat, 04 May 2024 13:26:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3J97-0007lb-8V; Sat, 04 May 2024 13:26:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=7WO6GDGGAUE6QPI1oXygWrJ66zmM4c0CCMULEu+KiXI=; b=EzQ8mfuh9ap6eN88/nN5 ragfJ4EX6SAK+x5QULxZw2SSOonLs4LGpT/ZLZmAvCX0+Ye1pIPFBXJZtpiYgJS1EZ7mjfqacB/nO A6j1zo7nJOHsuzixMQpFGIug3ZNU7HiLq47I7xhMtwT/Cs8oKXdIZZZ6dMgVDkMf9elAGmJOF0bBH m1/TuTxSt4bgD5YCzBbSwCuJqXBLvxUeIGM17o2wtpuDvOSYhUVt+3EbcOLJXPsW8GK56iRSvbz6d jQ0isDj6HDSZmBmEZX5SoV6oblWahJdkXQOAxF0HRE8QMC1i+ZeeQgWzCzJLrdr9YqStz39QOZlPa CtskTlVoNWUEFw==; In-Reply-To: (message from Ken Brown on Sat, 4 May 2024 13:15:19 -0400) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284448 Archived-At: > Date: Sat, 4 May 2024 13:15:19 -0400 > From: Ken Brown > Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org > > On 5/2/2024 10:26 AM, Ken Brown wrote: > > On 5/2/2024 2:21 AM, Eli Zaretskii wrote: > >>> Date: Wed, 1 May 2024 17:20:20 -0400 > >>> Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org > >>> From: Ken Brown > >>> > >>>>       char const *lock_info_fmt = (boot > >>>>                  ? "%s@%s.%"PRIdMAX":%"PRIdMAX > >>>>                  : "%s@%s.%"PRIdMAX); > >>>>       int len = snprintf (lock_info_str, sizeof lock_info_str, > >>>>             lock_info_fmt, user_name, host_name, pid, boot); > >>>> > >>>> get_boot_sec calls get_boot_time, which is a Gnulib function (see > >>>> lib/boot-time.c).  So I guess the key to unlock this puzzle is > >>>> somewhere there. > >>> > >>> I took a quick look at get_boot_time and found a bug, which may explain > >>> why some Cygwin systems behave differently from others.  I've reported > >>> it here: > >>> > >>>     https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00008.html > >> > >> Thanks.  This probably explains why the ":-NNNN" part sometimes > >> appears and sometimes doesn't appear in Cygwin builds of Emacs, but > >> AFAIU it does NOT explain why unlinking the symlink (when the file is > >> unlocked) fails when the lock file name includes the ":-NNNN" part. > >> Right? > > > > Yes, that's right.  I still need to look into that. > > It turns out that there was a Cygwin bug (already fixed in the Cygwin > development sources) that affected only version 3.5.3, and Bruno added a > workaround to Gnulib. I now see the ":NNNN" part on my system, without > a minus sign, and the lock file is deleted properly. Would you mind explaining for posterity (and for my personal curiosity) how what Bruno changed affects the deletion of the lock file? Is that because the ":-NNNN" suffix had the dash (because the system's page file was deemed to eb a directory)? If so, how did the presence of the dash cause the failure to delete the file?