GNU bug report logs - #70415
30.0.50; [Cygwin] `lock-file' creates a symlink with funny name

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Tue, 16 Apr 2024 12:34:04 UTC

Severity: normal

Found in version 30.0.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 70415 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Téchoueyres <pierre.techoueyres <at> free.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>, 70415 <at> debbugs.gnu.org
Subject: Re: bug#70415: 30.0.50; [Cygwin] `lock-file' creates a symlink with
 funny name
Date: Tue, 16 Apr 2024 20:01:56 +0200
Le mardi 16 avril 2024 à 16:32, Eli Zaretskii <eliz <at> gnu.org> a écrit :

>> Date: Tue, 16 Apr 2024 21:33:07 +0900
>> From: Katsumi Yamaoka <yamaoka <at> jpl.org>
>> 
>> As you know, Emacs creates a lock file when start editing a FILE
>> by default, it is a symbolic link that is linked to a name
>> looking like this:
>> 
>> .#FILE -> username <at> hostname.1234
>> 
>> Where 1234 is Emacs' pid.  It will be removed after saving
>> the FILE.  Even if the lock file is left, Emacs will remove it
>> when opening the FILE for the next time.  However, recently lock
>> files no longer got deleted on at least the latest Cygwin on
>> Windows 11.  It is (probably) because Emacs came to create lock
>> files with a funny name like this:
>> 
>> .#FILE -> username <at> hostname.1234:-11644473599
>> 
>> For that case `(unlock-file "FILE")' issues this warning:
>> 
>> Warning (unlock-file): Unlocking file: Invalid argument, FILE, ignored
>
> Does Cygwin support file names with a colon, such as the above?
>
> The part after the colon is the system boot time, and is used on all
> Posix hosts.  I don't know why it prints as a negative value on
> Cygwin, but the question is: does Cygwin support such file names?  If
> not, what are the restrictions on Cygwin file names that we need to
> observe when we create lock files?  This is likely a question for the
> Cygwin mailing list, or maybe you already know the answer.
>
> Several internal functions in filelock.c know about the
> USER <at> HOST.PID:BOOT_TIME format of the lock file names, so if there are
> any Cygwin-specific restrictions, they will all need to be patched
> accordingly.
>

May be this has something to do with NTFS Streams ?
See : https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c54dec26-1551-4d3a-a0ea-4fa40f848eb3

Disregard if not relevant.

>> I don't know what ":-11644473599" is, but I did the bisection
>> and found that it started with this change:
>> 
>> ,----
>> | commit 393f58c85aeb78f814866ccaad9ae7efd3fa6766
>> | Author: Adam Porter <adam <at> alphapapa.net>
>> | Date:   Fri Mar 8 23:43:14 2024 -0600
>> |
>> |     'vtable-update-object' can now be called with one argument
>
> This is extremely unlikely to have caused the problem.  It is more
> likely that some change in Cygwin and/or in the Gnulib's boot-time
> module causes this now.
>
> Also, do you see this in "emacs -Q"?  If not, perhaps some local
> customizations cause this?
>




This bug report was last modified 1 year and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.