Skip to main content

Module lock

Module lock 

Source
Expand description

Single-writer ownership via a process-local registry and fcntl lock.

POSIX record locks are not inherited across fork, but same-process locks do not conflict and closing any descriptor for the lock file releases them. The registry preserves same-process exclusion. Nothing else in this process may open STORE_LOCK_FILE.

Structs§

StoreLock
Exclusive writer ownership automatically released when the process dies.

Enums§

StoreLockError
Failure to open or acquire the single-writer lock.

Constants§

STORE_LOCK_FILE
Persistent lock filename; only StoreLock may open this file.