|
|
Subscribe / Log in / New account

Progress with a Plan

Progress with a Plan

Posted Oct 14, 2025 1:32 UTC (Tue) by josh (subscriber, #17465)
In reply to: Progress with a Plan by mjg59
Parent article: Debian Technical Committee overrides systemd change

For any software that can be modified, bridging the two is as simple as "do both, in a well-defined order, to be compatible with software that hasn't yet transitioned to flock; if you can't get the traditional lock because it's taken, handle that as the lock being held; if you can't get the traditional lock because you don't have permission to the directory, ignore it".


to post comments

Progress with a Plan

Posted Oct 15, 2025 2:38 UTC (Wed) by Hello71 (subscriber, #103412) [Link] (1 responses)

your algorithm only works if the modern program is started after the legacy program. in the reverse order, they will both obtain the lock.

Progress with a Plan

Posted Oct 15, 2025 3:12 UTC (Wed) by josh (subscriber, #17465) [Link]

No, it works in any of the possible orderings:

1) Modern flock, modern traditional lock, legacy traditional lock: The modern program has the lock, the legacy program waits until the modern program is done.

2) Modern flock, legacy traditional lock, modern traditional lock: the legacy program has the lock, the modern program is waiting on the traditional lock before it can run.

3) Legacy traditional lock, modern flock, modern traditional lock: The legacy program has the lock, the modern program is waiting on the traditional lock before it can run.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds