If the program crashes and exits awkwardly then the lock will not be released.
Context
Users sometimes delete active lock files on a shared system. This causes a lot of issues when you try to connect to an active module. Related to spaulaus/paass-lc#179
Possible Solution (optional)
The lock should be atomic. This would mean that the lock would destroy itself if the associated process crashes. This would remove issues with locks from old processes blocking new processes that would not interfere. By removing this the users no longer delete lock files and thus reduces the possibility of one user deleting the lock as the other is actively using the process.
Acceptance Criteria
[ ] The lock is atomic, so that when the program crashes/exits, the lock is removed.
Expected Behavior
When the program crashes, the lock is released.
Current Behavior
If the program crashes and exits awkwardly then the lock will not be released.
Context
Users sometimes delete active lock files on a shared system. This causes a lot of issues when you try to connect to an active module. Related to spaulaus/paass-lc#179
Possible Solution (optional)
The lock should be atomic. This would mean that the lock would destroy itself if the associated process crashes. This would remove issues with locks from old processes blocking new processes that would not interfere. By removing this the users no longer delete lock files and thus reduces the possibility of one user deleting the lock as the other is actively using the process.
Acceptance Criteria