fix a minor fd leak
This commit is contained in:
parent
853ec68253
commit
edc3bf2347
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ checkDaemon pidfile = do
|
||||||
Just fd -> do
|
Just fd -> do
|
||||||
locked <- getLock fd (ReadLock, AbsoluteSeek, 0, 0)
|
locked <- getLock fd (ReadLock, AbsoluteSeek, 0, 0)
|
||||||
p <- readish <$> readFile pidfile
|
p <- readish <$> readFile pidfile
|
||||||
return $ check locked p
|
closeFd fd `after` return (check locked p)
|
||||||
Nothing -> return Nothing
|
Nothing -> return Nothing
|
||||||
where
|
where
|
||||||
check Nothing _ = Nothing
|
check Nothing _ = Nothing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue