Terminate processes when process thread dies #103
This commit is contained in:
parent
a7e9ad8772
commit
de972c8f9b
1 changed files with 3 additions and 3 deletions
|
@ -360,7 +360,7 @@ system p s = liftIO (do
|
|||
unless finalized (hClose handle)
|
||||
return True )
|
||||
|
||||
bracket open (\(hIn, _) -> close hIn) (\(hIn, ph) -> do
|
||||
bracket open (\(hIn, ph) -> close hIn >> Process.terminateProcess ph) (\(hIn, ph) -> do
|
||||
let feedIn = do
|
||||
sh (do
|
||||
txt <- s
|
||||
|
@ -394,7 +394,7 @@ systemStrict p s = liftIO (do
|
|||
unless finalized (hClose handle)
|
||||
return True )
|
||||
|
||||
bracket open (\(hIn, _, _) -> close hIn) (\(hIn, hOut, ph) -> do
|
||||
bracket open (\(hIn, _, ph) -> close hIn >> Process.terminateProcess ph) (\(hIn, hOut, ph) -> do
|
||||
let feedIn = do
|
||||
sh (do
|
||||
txt <- s
|
||||
|
@ -461,7 +461,7 @@ stream p s = do
|
|||
unless finalized (hClose handle)
|
||||
return True )
|
||||
|
||||
(hIn, hOut, ph) <- using (managed (bracket open (\(hIn, _, _) -> close hIn)))
|
||||
(hIn, hOut, ph) <- using (managed (bracket open (\(hIn, _, ph) -> close hIn >> Process.terminateProcess ph)))
|
||||
let feedIn = do
|
||||
sh (do
|
||||
txt <- s
|
||||
|
|
Loading…
Reference in a new issue