On 10/8/25 7:09 AM, Josh Triplett wrote:
Simon Richter wrote:On 10/8/25 6:40 AM, Josh Triplett wrote:- First, port everything using `/var/lock` or `/run/lock` to lock something that has an obvious `flock` target (e.g. a serial device), one-by-one, to use `flock` *and*` a lockfile, silently ignoring permission errors iff it successfully acquired the `flock`.We can do this on Linux-with-udev, because /dev is guaranteed to support flock(). This might break on some embedded devices with pre-created device nodes (for faster boot), and on NFS-root, but everyone using one of these has left Debian years ago.Right.- Second, when everything has been ported *and* we've been through some transition period (using package dependencies in Debian and allowing some time for third-party sotware), we let software start deleting the lockfile code.The actual code will probably need to remain because we can't make decisions for non-Linux here. We might want to disable it."let software start deleting", not "force software to start deleting". It's up to individual programs how long they want to keep the non-flock lockfile compat code, and what systems other than Linux they expect to be compatible with.
I keep wondering if it's worth abstracting this into a library - instead of everyone trying to get it right themselves. But then something would need to come forward and implement that.
Kind regards Philipp Kern