[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:14:07 UTC 2010
The following commit has been merged in the master branch:
commit fc0c50549e9812ef55c1473813d3e99f9e92f399
Author: John Goerzen <jgoerzen at complete.org>
Date: Thu Nov 23 07:42:48 2006 +0100
New function forkRawSystem
diff --git a/MissingH/Cmd.hs b/MissingH/Cmd.hs
index affcf7d..f28f561 100644
--- a/MissingH/Cmd.hs
+++ b/MissingH/Cmd.hs
@@ -80,6 +80,7 @@ module MissingH.Cmd(-- * High-Level Tools
forceSuccess,
#ifndef __HUGS__
posixRawSystem,
+ forkRawSystem,
-- ** Piping with lazy strings
pipeFrom,
pipeLinesFrom,
@@ -402,6 +403,28 @@ posixRawSystem program args =
#endif
#endif
+#ifndef mingw32_HOST_OS
+#ifndef __HUGS__
+{- | Invokes the specified command in a subprocess, without waiting for
+the result. Returns the PID of the subprocess -- it is YOUR responsibility
+to use getProcessStatus or getAnyProcessStatus on that at some point. Failure
+to do so will lead to resource leakage (zombie processes).
+
+This function does nothing with signals. That too is up to you.
+
+Logs as MissingH.Cmd.forkRawSystem -}
+forkRawSystem :: FilePath -> [String] -> IO ProcessStatus
+forkRawSystem program args =
+ do debugM (logbase ++ ".forkRawSystem")
+ ("Running: " ++ program ++ " " ++ (show args))
+ forkProcess childaction
+
+ where childaction =
+ executeFile program True args Nothing
+
+#endif
+#endif
+
cmdfailed :: String -> FilePath -> [String] -> Int -> IO a
cmdfailed funcname command args failcode = do
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list