async exception safety for openFd
Audited for openFile and openFd, and this fixes all the ones I found where an async exception could prevent the file getting closed. Except for the lock pool, which is a whole other can of worms.
This commit is contained in:
parent
1dd770b1af
commit
0210e81d83
5 changed files with 35 additions and 13 deletions
|
@ -230,7 +230,7 @@ probeLockSupport = withEventuallyCleanedOtherTmp $ \tmp -> do
|
|||
where
|
||||
go f mode = do
|
||||
nukeFile f
|
||||
let locktest =
|
||||
let locktest = mask $ const $
|
||||
Posix.lockExclusive (Just mode) f
|
||||
>>= Posix.dropLock
|
||||
ok <- isRight <$> tryNonAsync locktest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue