clean up temp file
This commit is contained in:
parent
e31a51c5bb
commit
88d94e674c
1 changed files with 3 additions and 1 deletions
|
@ -93,7 +93,9 @@ tryLock lockfile = trySideLock lockfile $ \sidelock -> do
|
||||||
return Nothing
|
return Nothing
|
||||||
let tooklock = return $ Just $ LockHandle lockfile fd sidelock
|
let tooklock = return $ Just $ LockHandle lockfile fd sidelock
|
||||||
ifM (isJust <$> catchMaybeIO (createLink tmp lockfile))
|
ifM (isJust <$> catchMaybeIO (createLink tmp lockfile))
|
||||||
( tooklock
|
( do
|
||||||
|
nukeFile tmp
|
||||||
|
tooklock
|
||||||
, do
|
, do
|
||||||
v <- readPidLock lockfile
|
v <- readPidLock lockfile
|
||||||
hn <- getHostName
|
hn <- getHostName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue