diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-18 13:30:53 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-18 13:31:00 -0400 |
commit | 05310538ef4f2c0c483bab355083ec2044a12a0a (patch) | |
tree | c16d81764f760d82a3060e6a6f81f33cee87fae6 /Utility | |
parent | 182526ff68b1ca68952b4dbd32121e46d4a80e85 (diff) |
more debugging
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/SafeCommand.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Utility/SafeCommand.hs b/Utility/SafeCommand.hs index 2c6439b45..5f6a53e71 100644 --- a/Utility/SafeCommand.hs +++ b/Utility/SafeCommand.hs @@ -54,6 +54,7 @@ safeSystem command params = safeSystemEnv command params Nothing {- SIGINT(ctrl-c) is allowed to propigate and will terminate the program. -} safeSystemEnv :: FilePath -> [CommandParam] -> Maybe [(String, String)] -> IO ExitCode safeSystemEnv command params env = do + putStrLn "safeSystemEnv start" -- Going low-level because all the high-level system functions -- block SIGINT etc. We need to block SIGCHLD, but allow -- SIGINT to do its default program termination. @@ -65,7 +66,9 @@ safeSystemEnv command params env = do mps <- getProcessStatus True False childpid restoresignals oldint oldset case mps of - Just (Exited code) -> return code + Just (Exited code) -> do + putStrLn "safeSystemEnv end" + return code _ -> error $ "unknown error running " ++ command where restoresignals oldint oldset = do @@ -78,9 +81,11 @@ safeSystemEnv command params env = do {- executeFile with debug logging -} executeFile :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO () executeFile c path p e = do + putStrLn "executeFile start" --debugM "Utility.SafeCommand.executeFile" $ -- "Running: " ++ c ++ " " ++ show p ++ " " ++ maybe "" show e System.Posix.Process.executeFile c path p e + putStrLn "executeFile end" {- Escapes a filename or other parameter to be safely able to be exposed to - the shell. -} |