Bug#1110980: /var/lock/ is the standard interface for serial devices locks

Aurelien Jarno aurel32 at debian.org
Sun Aug 24 20:40:32 BST 2025


Hi,

On 2025-08-13 10:23, Marco d'Itri wrote:
> Package: systemd
> Version: 258~rc2-2
> Severity: critical
> 
> Control: forwarded -1 https://github.com/systemd/systemd/issues/38563
> 
> Breaks unrelated software.
> 
> /var/lock/ is not just the dumping ground for lock files of random 
> applications, but also the published interface for system-wide locks of 
> serial devices.
> 
> From section 5.9.1 of the FHS:
> 
>    Lock files should be stored within the /var/lock directory
>    structure.
> 
>    Lock files for devices and other resources shared by multiple
>    applications, such as the serial device lock files that were
>    originally found in either /usr/spool/locks or /usr/spool/uucp,
>    must now be stored in /var/lock. The naming convention which
>    must be used is "LCK.." followed by the base name of the
>    device. For example, to lock /dev/ttyS0 the file "LCK..ttyS0"
>    would be created. ^[43]

Please also note that this is also the way recommended by the Linux 
kernel documentation:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.rst#n221

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                     http://aurel32.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20250824/66b10faf/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list