[project @ 2003-06-06 09:43:50 by stolz]
[ghc-hetmet.git] / ghc / compiler / main / SysTools.lhs
index c8163d9..b908b2c 100644 (file)
@@ -114,10 +114,6 @@ import System.Cmd       ( rawSystem )
 #else
 import SystemExts       ( rawSystem )
 #endif
-
-#else /* Not Win32 */
-
-import System          ( system )
 #endif
 \end{code}
 
@@ -720,7 +716,16 @@ runSomething phase_name pgm args
              -- NOT REACHED
               return ExitSuccess
             Just child -> do -- Parent
+#if __GLASGOW_HASKELL__ <= 504
+              -- avoid interaction with broken getProcessStatus-FFI:
+              oldHandler <- installHandler sigCONT Ignore Nothing
+#endif
               Just (Exited res) <- getProcessStatus True False child
+#if __GLASGOW_HASKELL__ <= 504
+              -- restore handler
+              installHandler sigCONT oldHandler Nothing
+#endif
+
               return res
 #else
           exit_code <- rawSystem cmd_line