From d56333750e8cbea2a80962744602ba4243aeb8a7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Mar 2016 15:05:40 -0400 Subject: propellor spin --- src/System/Console/Concurrent/Internal.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/System/Console/Concurrent/Internal.hs b/src/System/Console/Concurrent/Internal.hs index a4cafb61..38cc867a 100644 --- a/src/System/Console/Concurrent/Internal.hs +++ b/src/System/Console/Concurrent/Internal.hs @@ -284,6 +284,7 @@ createProcessForeground p = do fgProcess :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ConcurrentProcessHandle) fgProcess p = do + print ("fgProcess", showProc p) r@(_, _, _, h) <- P.createProcess p `onException` dropOutputLock -- Wait for the process to exit and drop the lock. @@ -297,6 +298,7 @@ bgProcess :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, Co bgProcess p = do (toouth, fromouth) <- pipe (toerrh, fromerrh) <- pipe + print ("bgProcess", showProc p) let p' = p { P.std_out = rediroutput (P.std_out p) toouth , P.std_err = rediroutput (P.std_err p) toerrh @@ -318,6 +320,11 @@ bgProcess p = do | otherwise = ss #endif +showProc = go . P.cmdspec + where + go (P.ShellCommand s) = s + go (P.RawCommand s ps) = show (s, ps) + willOutput :: P.StdStream -> Bool willOutput P.Inherit = True willOutput _ = False -- cgit v1.2.3