From 8579d5c5c436cffca56506cd6c52f90d64b082ce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Oct 2015 13:17:39 -0400 Subject: propellor spin --- src/Utility/ConcurrentOutput.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs index 20e39832..279421e2 100644 --- a/src/Utility/ConcurrentOutput.hs +++ b/src/Utility/ConcurrentOutput.hs @@ -116,6 +116,7 @@ updateOutputLocker l = do lcker <- outputLockedBy <$> getOutputHandle void $ tryTakeMVar lcker putMVar lcker l + modifyMVar_ lcker (const $ return l) -- | Use this around any IO actions that use `outputConcurrent` -- or `createProcessConcurrent` @@ -169,15 +170,11 @@ createProcessConcurrent p firstprocess , do lcker <- outputLockedBy <$> getOutputHandle - l <- tryReadMVar lcker - hPutStrLn stderr $ show ("IS CONCURRENT", cmd, l) + hPutStrLn stderr $ show ("IS CONCURRENT", cmd) hFlush stderr concurrentprocess ) - | otherwise = do - hPutStrLn stderr $ show ("NO OUTPUT", cmd) - hFlush stderr - P.createProcess p + | otherwise = P.createProcess p where willoutput P.Inherit = True willoutput _ = False -- cgit v1.3-2-g0d8e