summaryrefslogtreecommitdiff
path: root/src/System/Process
diff options
context:
space:
mode:
authorJoey Hess2020-06-10 17:07:43 -0400
committerJoey Hess2020-06-10 17:07:43 -0400
commit162e1d4e82e24f0fe3e2bd3114e4366ddb1062c0 (patch)
treefa917a670e160601b536be0a79f3f3ac61c6d03a /src/System/Process
parente6d4139e15b3a52f4a60178bb7d15ba96f191340 (diff)
merge from concurrent-output
This includes e6d4139e15b3a52f4a60178bb7d15ba96f191340 which I hope fixes the reversion that has been plaguing propellor when trying to use more recent versions of concurrent-output. Embedding it will let me test, and also it will be years until that fix is widely enough available to depend on it.
Diffstat (limited to 'src/System/Process')
-rw-r--r--src/System/Process/Concurrent.hs16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/System/Process/Concurrent.hs b/src/System/Process/Concurrent.hs
index 0e00e4fd..346ce2e0 100644
--- a/src/System/Process/Concurrent.hs
+++ b/src/System/Process/Concurrent.hs
@@ -9,26 +9,14 @@
module System.Process.Concurrent where
import System.Console.Concurrent
-import System.Console.Concurrent.Internal (ConcurrentProcessHandle(..))
import System.Process hiding (createProcess, waitForProcess)
import System.IO
import System.Exit
-- | Calls `createProcessConcurrent`
---
--- You should use the waitForProcess in this module on the resulting
--- ProcessHandle. Using System.Process.waitForProcess instead can have
--- mildly unexpected results.
createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
-createProcess p = do
- (i, o, e, ConcurrentProcessHandle h) <- createProcessConcurrent p
- return (i, o, e, h)
+createProcess = createProcessConcurrent
-- | Calls `waitForProcessConcurrent`
---
--- You should only use this on a ProcessHandle obtained by calling
--- createProcess from this module. Using this with a ProcessHandle
--- obtained from System.Process.createProcess etc will have extremely
--- unexpected results; it can wait a very long time before returning.
waitForProcess :: ProcessHandle -> IO ExitCode
-waitForProcess = waitForProcessConcurrent . ConcurrentProcessHandle
+waitForProcess = waitForProcessConcurrent