X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FSysTools.lhs;h=b908b2ce3e6e264247305800b8d4c820a8296b6b;hb=cbc2146f970905a626c4ef364f08b75965c8bf8e;hp=5ca276583524d65a2292b78dda5ad9bc15b43191;hpb=3a47678a35200aa4e225699428823f050b488f27;p=ghc-hetmet.git diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 5ca2765..b908b2c 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -114,10 +114,6 @@ import System.Cmd ( rawSystem ) #else import SystemExts ( rawSystem ) #endif - -#else /* Not Win32 */ - -import System ( system ) #endif \end{code} @@ -712,9 +708,6 @@ runSomething phase_name pgm args = traceCmd phase_name (concat (intersperse " " (pgm:quoteargs))) $ do #ifndef mingw32_HOST_OS - installHandler sigCHLD Ignore Nothing - -- avoid strange interaction with waitpid(): - installHandler sigCONT Ignore Nothing mpid <- forkProcess exit_code <- case mpid of Nothing -> do -- Child @@ -723,7 +716,16 @@ runSomething phase_name pgm args -- NOT REACHED return ExitSuccess Just child -> do -- Parent - Just (Exited res) <- getProcessStatus True True child +#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