summaryrefslogtreecommitdiff
path: root/src/Utility
diff options
context:
space:
mode:
authorJoey Hess2015-10-28 11:32:16 -0400
committerJoey Hess2015-10-28 11:32:16 -0400
commit6d8a4009f5867fa42d9882fd691ff9af4b9884ed (patch)
tree4a32fdf14f5a05e88e672c63d3095ae96a10309e /src/Utility
parentfee69b9e1e5ae0ebd7061c0147ed9de3ed0c2ed7 (diff)
propellor spin
Diffstat (limited to 'src/Utility')
-rw-r--r--src/Utility/ConcurrentOutput.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs
index 3624ffbf..35904cb7 100644
--- a/src/Utility/ConcurrentOutput.hs
+++ b/src/Utility/ConcurrentOutput.hs
@@ -132,14 +132,22 @@ createProcessConcurrent :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle, Ma
createProcessConcurrent p
| hasoutput (P.std_out p) || hasoutput (P.std_err p) =
ifM tryTakeOutputLock
- ( firstprocess
- , concurrentprocess
+ ( do
+ print ("FIRST", pc)
+ firstprocess
+ , do
+ print ("CONCURRENT", pc)
+ concurrentprocess
)
| otherwise = P.createProcess p
where
hasoutput P.Inherit = True
hasoutput _ = False
+ pc = case P.cmdspec p of
+ P.ShellCommand s -> s
+ P.RawCommand c ps -> unwords (c:ps)
+
firstprocess = do
r@(_, _, _, h) <- P.createProcess p
`onException` dropOutputLock