rib
rib copied to clipboard
Process locking
Rib should lock the directory when watching for changes, so that a second instance is prohibited at the beginning.
This should behave similar to Shake's locking, which reports as follows (when two instances of rib process is running at the same time, and a source file gets changed):
[Rib] Watching a/ for changes
# a/tidbits.dhall
[Rib] Shake error: Shake failed to acquire a file lock on .shake/.shake.lock
Shake process ID 30041 is using this lock.
setLock: resource exhausted (Resource temporarily unavailable)
CallStack (from HasCallStack):
errorIO, called at src/General/FileLock.hs:67:9 in shake-0.18.4-5VRu9yKqXOY
JrfQmbOPO6w:General.FileLock