Safe Haskell | Safe-Infered |
---|
Utility function for detecting the death of a job holding resources
To clean up resources owned by jobs that die for some reason, we need to detect whether a job is still alive. As we have no control over PID reuse, our approach is that each requester for a resource has to provide a file where it owns an exclusive lock on. The kernel will make sure the lock is removed if the process dies. We can probe for such a lock by requesting a shared lock on the file.
- cleanupInterval :: Int
- cleanupLocksTask :: WConfdMonadInt ()
Documentation
cleanupInterval :: IntSource
cleanupLocksTask :: WConfdMonadInt ()Source
Thread periodically cleaning up locks of lock owners that died.