Subject: bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 30 Jun 2021 16:08:01 +0200

Eli Zaretskii <[email-masked]> writes:

>> The lockfiles are symlinks, so it should theoretically be
>> possible to have them elsewhere without being any racier than the code
>> currently is, I think.
>
> ...even if the lock files are symlinks (which they not necessarily
> are), we need to handle the case of several files with identical
> basenames in different directories.

We could perhaps reuse the auto-save file name logic?  I.e., extend
`make-auto-save-file-name' so that we can use it to compute the lock
file names, too.

Or just use the UNIIFY logic from auto-save-file-name-transforms
unconditionally...

> (Their being symlinks is unimportant, because the target of the
> symlink doesn't exist.)

Right; I'd forgotten that we just use the lock symlink to stash some
extra data about the locking Emacs process.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no