diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-11-13 12:52:24 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-11-13 12:52:24 -0400 |
commit | ac0ca1b21f4670b0ab03df44a132caed64818978 (patch) | |
tree | f706e8392c736c7e911719b657722528df56a3c4 /Utility/LockFile | |
parent | 4799572544e8d02940eb4397c2162428d04853ee (diff) |
clean up temp file
Diffstat (limited to 'Utility/LockFile')
-rw-r--r-- | Utility/LockFile/PidLock.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Utility/LockFile/PidLock.hs b/Utility/LockFile/PidLock.hs index 94c70e714..d1ee6502a 100644 --- a/Utility/LockFile/PidLock.hs +++ b/Utility/LockFile/PidLock.hs @@ -93,7 +93,9 @@ tryLock lockfile = trySideLock lockfile $ \sidelock -> do return Nothing let tooklock = return $ Just $ LockHandle lockfile fd sidelock ifM (isJust <$> catchMaybeIO (createLink tmp lockfile)) - ( tooklock + ( do + nukeFile tmp + tooklock , do v <- readPidLock lockfile hn <- getHostName |