From 63c7d246b206e774baf3767333d170c9c74b63d9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Oct 2015 13:03:58 -0400 Subject: propellor spin --- src/Utility/ConcurrentOutput.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Utility') diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs index 9e6b6a68..a1a8898d 100644 --- a/src/Utility/ConcurrentOutput.hs +++ b/src/Utility/ConcurrentOutput.hs @@ -162,7 +162,9 @@ outputConcurrent s = do -- as the output lock becomes free. createProcessConcurrent :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, P.ProcessHandle) createProcessConcurrent p - | willoutput (P.std_out p) || willoutput (P.std_err p) = + | willoutput (P.std_out p) || willoutput (P.std_err p) = do + hPutStrLn stderr $ show ("CHECK CONCURRENT", cmd) + hFlush stderr ifM tryTakeOutputLock ( do hPutStrLn stderr $ show ("NOT CONCURRENT", cmd) @@ -175,7 +177,10 @@ createProcessConcurrent p hFlush stderr concurrentprocess ) - | otherwise = P.createProcess p + | otherwise = do + hPutStrLn stderr $ show ("NO OUTPUT", cmd) + hFlush stderr + P.createProcess p where willoutput P.Inherit = True willoutput _ = False -- cgit v1.3-2-g0d8e