[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 15:10:53 UTC 2010


The following commit has been merged in the master branch:
commit 066f1034ac8464224025749921aa756fe68062b3
Author: John Goerzen <jgoerzen at complete.org>
Date:   Tue Jul 4 22:05:13 2006 +0100

    Start work on posixRawSystem

diff --git a/MissingH/Cmd.hs b/MissingH/Cmd.hs
index 8531ff8..9d98ab0 100644
--- a/MissingH/Cmd.hs
+++ b/MissingH/Cmd.hs
@@ -348,6 +348,32 @@ safeSystem command args =
             ExitSuccess -> return ()
             ExitFailure fc -> cmdfailed "safeSystem" command args fc
 
+#ifndef mingw32_HOST_OS
+#ifndef __HUGS__
+{- | Invokes the specified command in a subprocess, waiting for the result.
+Return the result status.  Never raises an exception.  Only available
+on POSIX platforms. -}
+posixRawSystem :: FilePath -> [String] -> IO 
+posixRawSystem program args =
+    do oldint <- installHandler sigINT Ignore Nothing
+       oldquit <- installHandler sigQUIT Ignore Nothing
+       let sigset = addSignal sigCHLD emptySignalSet
+       oldset <- getSignalMask
+       blockSignals sigset
+       childpid <- forkProcess childaction
+       
+       
+
+       installHandler sigINT oldint Nothing
+       installHandler sigQUIT oldquit Nothing
+       setSignalMask oldset
+
+    where childaction =
+              do 
+#endif
+#endif
+
+
 cmdfailed :: String -> FilePath -> [String] -> Int -> IO a
 cmdfailed funcname command args failcode = do
     let errormsg = "Command " ++ command ++ " " ++ (show args) ++

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list