summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2015-10-28 14:40:11 -0400
committerJoey Hess2015-10-28 14:40:11 -0400
commita662eb67ec59eee6e49f98eda6dfa48f45b9567d (patch)
tree48912a3c9afc2e503dc6c36745a92c7c68c13d1e
parent480d4eb4993b82e15ecbbfcc4aa6f600166197d2 (diff)
propellor spin
-rw-r--r--src/Utility/ConcurrentOutput.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs
index 40e0125e..4d74e090 100644
--- a/src/Utility/ConcurrentOutput.hs
+++ b/src/Utility/ConcurrentOutput.hs
@@ -85,7 +85,11 @@ takeOutputLock' block = go =<< withLock tryTakeTMVar
( havelock
, if block
then do
+ hPutStr stderr "WAITFORPROCESS in lock"
+ hFlush stderr
void $ P.waitForProcess h
+ hPutStr stderr "WAITFORPROCESS in lock done"
+ hFlush stderr
havelock
else do
withLock (`putTMVar` orig)
@@ -133,7 +137,12 @@ 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 = lockOutput (return ())
+ drain = do
+ hPutStrLn stderr "DRAIN"
+ hFlush stderr
+ lockOutput (return ())
+ hPutStrLn stderr "DRAIN DONE"
+ hFlush stderr
-- | Displays a string to stdout, and flush output so it's displayed.
--