From 80e28e5e4e97e6b11b54c9f086601f84c2d27440 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Oct 2015 17:04:17 -0400 Subject: remove debug code --- src/Utility/ConcurrentOutput.hs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/Utility') 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 -- cgit v1.2.3