diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-28 14:45:08 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-28 14:45:08 -0400 |
| commit | 204c453b32ce6a4b0561a5bd5c3feac9e4f32860 (patch) | |
| tree | e8515dd5e8a4313e0eebedb169f4c5936b8f54c6 /src/Utility/ConcurrentOutput.hs | |
| parent | 5aac24db607d80bd56ac76312c0c905fe806fc9c (diff) | |
propellor spin
Diffstat (limited to 'src/Utility/ConcurrentOutput.hs')
| -rw-r--r-- | src/Utility/ConcurrentOutput.hs | 18 |
1 files changed, 3 insertions, 15 deletions
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 |
