-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vere: use fcntl advisory locks on pidfile (#697)
The PR replaces vere's current (buggy, insufficient) lockfile mechanism with an advisory `fcntl()` write lock (`F_SETLK`, `F_WRLCK`) on the first byte of vere's PID file (`$pier/.vere.lock`). It does not (yet?) include the functionality to kill the lock-holder and take over the pier, as I'm not sure that's desirable. There have been many problems with vere's current lockfile implementation. The biggest advantage of this approach is that the lock is automatically released if the process is killed or the host system crashes. The biggest question is: does it work reliably across docker shared volumes, virtual machines, &c.
- Loading branch information
Showing
2 changed files
with
106 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters