summaryrefslogtreecommitdiff
path: root/src/Utility
diff options
context:
space:
mode:
authorJoey Hess2015-10-28 17:04:17 -0400
committerJoey Hess2015-10-28 17:04:17 -0400
commit80e28e5e4e97e6b11b54c9f086601f84c2d27440 (patch)
tree9431b78b5adf8764b77b40c0204ea7131d972f5f /src/Utility
parent5cde1ed21cc912db0b53846196f920fe52835dbc (diff)
remove debug code
Diffstat (limited to 'src/Utility')
-rw-r--r--src/Utility/ConcurrentOutput.hs19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs
index be1562ac..091513d0 100644
--- a/src/Utility/ConcurrentOutput.hs
+++ b/src/Utility/ConcurrentOutput.hs
@@ -38,11 +38,7 @@ data OutputHandle = OutputHandle
data Locker
= GeneralLock
- | ProcessLock P.ProcessHandle String
-
-instance Show Locker where
- show GeneralLock = "GeneralLock"
- show (ProcessLock _ cmd) = "ProcessLock " ++ cmd
+ | ProcessLock P.ProcessHandle
-- | A shared global variable for the OutputHandle.
{-# NOINLINE globalOutputHandle #-}
@@ -84,7 +80,7 @@ takeOutputLock' block = go =<< withLock tryTakeTMVar
-- We must always be sure to fill the TMVar back with Just or Nothing.
go (Just orig) = case orig of
Nothing -> havelock
- (Just (ProcessLock h _)) ->
+ (Just (ProcessLock h)) ->
-- when process has exited, lock is stale
ifM (isJust <$> P.getProcessExitCode h)
( havelock
@@ -192,14 +188,10 @@ createProcessConcurrent p
| willOutput ss = P.UseHandle h
| otherwise = ss
- cmd = case P.cmdspec p of
- P.ShellCommand s -> s
- P.RawCommand c ps -> unwords (c:ps)
-
firstprocess = do
r@(_, _, _, h) <- P.createProcess p
`onException` dropOutputLock
- updateOutputLocker (ProcessLock h cmd)
+ updateOutputLocker (ProcessLock h)
-- Output lock is still held as we return; the process
-- is running now, and once it exits the output lock will
-- be stale and can then be taken by something else.
@@ -234,11 +226,6 @@ data BufferedActivity
| InTempFile FilePath
deriving (Eq)
-instance Show BufferedActivity where
- show ReachedEnd = "ReachedEnd"
- show (Output b) = "Output " ++ show (B.length b)
- show (InTempFile t) = "InTempFile " ++ t
-
setupBuffer :: Handle -> Handle -> P.StdStream -> Handle -> IO (Handle, MVar Buffer, TMVar ())
setupBuffer h toh ss fromh = do
hClose toh