diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-11-01 18:31:12 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-11-01 18:31:12 -0400 |
| commit | 3bfe374d55860b96eddae32469e1afa6c041e5f6 (patch) | |
| tree | 26db22cdea7fb5867766a919fac160866a55472c | |
| parent | d12f7f3ebf633470932b80fbadc9db762a6b57a8 (diff) | |
merge from concurrent-output
| -rw-r--r-- | src/System/Console/Concurrent/Internal.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/System/Console/Concurrent/Internal.hs b/src/System/Console/Concurrent/Internal.hs index 55290921..b93e7f80 100644 --- a/src/System/Console/Concurrent/Internal.hs +++ b/src/System/Console/Concurrent/Internal.hs @@ -173,7 +173,7 @@ toConcurrentProcessHandle (i, o, e, h) = (i, o, e, ConcurrentProcessHandle h) -- exit status. -- -- Note that such processes are actually automatically waited for --- internally, so not calling this exiplictly will not result +-- internally, so not calling this explicitly will not result -- in zombie processes. This behavior differs from `P.waitForProcess` waitForProcessConcurrent :: ConcurrentProcessHandle -> IO ExitCode waitForProcessConcurrent (ConcurrentProcessHandle h) = checkexit @@ -243,8 +243,8 @@ createProcessConcurrent p ) | otherwise = do r@(_, _, _, h) <- P.createProcess p - asyncProcessWaiter $ do - void $ P.waitForProcess h + asyncProcessWaiter $ + void $ tryIO $ P.waitForProcess h return (toConcurrentProcessHandle r) -- | Wrapper around `System.Process.createProcess` that makes sure a process @@ -261,7 +261,7 @@ fgProcess p = do `onException` dropOutputLock -- Wait for the process to exit and drop the lock. asyncProcessWaiter $ do - void $ P.waitForProcess h + void $ tryIO $ P.waitForProcess h dropOutputLock return (toConcurrentProcessHandle r) @@ -276,7 +276,7 @@ bgProcess p = do registerOutputThread r@(_, _, _, h) <- P.createProcess p' `onException` unregisterOutputThread - asyncProcessWaiter $ void $ P.waitForProcess h + asyncProcessWaiter $ void $ tryIO $ P.waitForProcess h outbuf <- setupOutputBuffer StdOut toouth (P.std_out p) fromouth errbuf <- setupOutputBuffer StdErr toerrh (P.std_err p) fromerrh void $ async $ bufferWriter [outbuf, errbuf] |
