Safe Haskell | None |
---|
Utilities related to livelocks and death detection
Synopsis
- type Livelock = FilePath
- mkLivelockFile :: (Error e, MonadError e m, MonadIO m) => FilePath -> m (Fd, Livelock)
- listLiveLocks :: IO [FilePath]
- isDead :: Livelock -> IO Bool
Documentation
mkLivelockFile :: (Error e, MonadError e m, MonadIO m) => FilePath -> m (Fd, Livelock) Source #
Appends the current time to the given prefix, creates the lockfile in the appropriate directory, and locks it. Returns its full path and the file's file descriptor.
listLiveLocks :: IO [FilePath] Source #
List currently existing livelocks. Underapproximate if some error occurs.
isDead :: Livelock -> IO Bool Source #
Detect whether a the process identified by the given path does not exist any more. This function never fails and only returns True if it has positive knowledge that the process does not exist any more (i.e., if it managed successfully obtain a shared lock on the file).