-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
-f
(force) option to auto clean stale locks
If a local lock exists and the process is no longer running (according to the contained PID) or if a remote lock exists and was created by the same (local) host and the indicated PID is no longer running, then clean up the lock files and continue. This changes the remote locking mechanism so that the remote hostname, PID, and starting timestamp, are added to a lock file called `remote` in the tmp/lock folder on the remote host. This is meant to allow a client to detect if it is the client owning the lock file and allows it to determine if the PID which created the lock file is still running. If two clients have the same hostname, it could be possible for them to clobber each other with the `-f` option. It's up to the administrator to make sure all connecting clients have different hostnames when using this new options. A new exit status is created, `6` which indicates that the remote lock file is owned by this host and is considered stale. The `1` status is reused if it can be detected that this host is currently syncing to the host in a different PID. The `3` status is reused to indicate that another client is syncing with this remote. If the remote lock file is stale because another client crashed, then that client would have to remove the lock or it would have to be manually removed.
- Loading branch information
Jared Hancock
committed
Aug 6, 2018
1 parent
c63d3a1
commit 5bc8402
Showing
3 changed files
with
79 additions
and
7 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
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