[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:07:15 UTC 2010
The following commit has been merged in the master branch:
commit bdbc9fd7b28f2982a9287b127a6f5638020f9ad1
Author: John Goerzen <jgoerzen at complete.org>
Date: Wed Feb 8 03:41:15 2006 +0100
Wrappers around Hugs
diff --git a/MissingH/Cmd.hs b/MissingH/Cmd.hs
index 2464f0b..8c3b98c 100644
--- a/MissingH/Cmd.hs
+++ b/MissingH/Cmd.hs
@@ -157,7 +157,7 @@ getProcessStatus on the 'PipeHandle'. Zomeibes will result otherwise.
This function logs as pipeFrom.
-Not available on Windows.
+Not available on Windows or with Hugs.
-}
hPipeFrom :: FilePath -> [String] -> IO (PipeHandle, Handle)
hPipeFrom fp args =
@@ -166,7 +166,11 @@ hPipeFrom fp args =
let childstuff = do dupTo (snd pipepair) stdOutput
closeFd (fst pipepair)
executeFile fp True args Nothing
+#ifdef __HUGS__
+ fail $ "hPipeFrom: forkProcess is not available in Hugs."
+#else
p <- try (forkProcess childstuff)
+#endif
-- parent
pid <- case p of
Right x -> return x
@@ -211,7 +215,11 @@ hPipeTo fp args =
let childstuff = do dupTo (fst pipepair) stdInput
closeFd (snd pipepair)
executeFile fp True args Nothing
+#ifdef __HUGS__
+ fail $ "hPipeTo: forkProcess is not available in Hugs."
+#else
p <- try (forkProcess childstuff)
+#endif
-- parent
pid <- case p of
Right x -> return x
@@ -263,7 +271,11 @@ hPipeBoth fp args =
dupTo (fst topair) stdInput
closeFd (snd topair)
executeFile fp True args Nothing
+#ifdef __HUGS__
+ fail $ "hPipeBoth: forkProcess is not available in Hugs."
+#else
p <- try (forkProcess childstuff)
+#endif
-- parent
pid <- case p of
Right x -> return x
@@ -410,7 +422,11 @@ pOpen3 pin pout perr fp args func childfunc =
func p
in
do
+#ifdef __HUGS__
+ fail $ "pOpen3: forkProcess is not available in Hugs."
+#else
p <- try (forkProcess childstuff)
+#endif
pid <- case p of
Right x -> return x
Left e -> fail ("Error in fork: " ++ (show e))
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list