noCreateProcessWhile to fix close-on-exec races
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
parent
adf1dbb5ca
commit
38786a4e5e
10 changed files with 78 additions and 30 deletions
|
@ -45,7 +45,7 @@ processTranscript'' cp input = do
|
|||
#ifndef mingw32_HOST_OS
|
||||
{- This implementation interleves stdout and stderr in exactly the order
|
||||
- the process writes them. -}
|
||||
let setup = do
|
||||
let setup = noCreateProcessWhile $ do
|
||||
(readf, writef) <- System.Posix.IO.createPipe
|
||||
System.Posix.IO.setFdOption readf System.Posix.IO.CloseOnExec True
|
||||
System.Posix.IO.setFdOption writef System.Posix.IO.CloseOnExec True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue