Attempt to remove stale config file locks #79
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
QLockFile checks whether a process with the PID in the lock file exists,
and assumes the lock is held if one does. In many cases that can result
in false-positive "locked" errors, especially after unexpected reboots.
It's very bad if we tell users that their configuration is in use when
it isn't. To avoid this, try removing stale lock files automatically. On
most systems, if the lock is truly held, the removal will fail and we
can safely display the error.
It's possible that this could allow users on networked filesystems to
launch multiple instances, but that is less of a bug than the existing
one.
Fixes #73