From 204c453b32ce6a4b0561a5bd5c3feac9e4f32860 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Oct 2015 14:45:08 -0400 Subject: propellor spin --- src/Utility/ConcurrentOutput.hs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/Utility/ConcurrentOutput.hs') diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs index a66180d2..867ee605 100644 --- a/src/Utility/ConcurrentOutput.hs +++ b/src/Utility/ConcurrentOutput.hs @@ -137,12 +137,7 @@ withConcurrentOutput a = a `finally` drain where -- Just taking the output lock is enough to ensure that anything -- that was buffering output has had a chance to flush its buffer. - drain = do - hPutStrLn stderr "DRAIN" - hFlush stderr - lockOutput (return ()) - hPutStrLn stderr "DRAIN DONE" - hFlush stderr + drain = lockOutput noop -- | Displays a string to stdout, and flush output so it's displayed. -- @@ -178,15 +173,8 @@ createProcessConcurrent :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle, Ma createProcessConcurrent p | willOutput (P.std_out p) || willOutput (P.std_err p) = ifM tryTakeOutputLock - ( do - hPutStrLn stderr $ show ("NOT CONCURRENT", cmd) - hFlush stderr - firstprocess - , do - v <- withLock $ tryReadTMVar - hPutStrLn stderr $ show ("IS CONCURRENT", cmd, v) - hFlush stderr - concurrentprocess + ( firstprocess + , concurrentprocess ) | otherwise = P.createProcess p where -- cgit v1.3-2-g0d8e