From 6d8a4009f5867fa42d9882fd691ff9af4b9884ed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Oct 2015 11:32:16 -0400 Subject: propellor spin --- src/Utility/ConcurrentOutput.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/Utility/ConcurrentOutput.hs') 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 -- cgit v1.2.3