From 980c9615a3b27f98224999fb1b828b7145ca1d8e Mon Sep 17 00:00:00 2001 From: panne Date: Thu, 5 Jun 2003 12:09:52 +0000 Subject: [PATCH] [project @ 2003-06-05 12:09:52 by panne] Attention: Tentative fix only! But at least this works much better than before. From the Linux man page for waitpid: [...] ERRORS ECHILD if the process specified in pid does not exist or is not a child of the calling process. (This can happen for one's own child if the action for SIGCHLD is set to SIG_IGN. See also the LINUX NOTES section about threads.) [...] Consequently, we don't ignore SIGCHLD anymore. Further changes: * SIGCONT is not ignored anymore, either. What was this for? * Don't use WUNTRACED in waitpid. Again, what was this for? --- ghc/compiler/main/SysTools.lhs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 5ca2765..c8163d9 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -712,9 +712,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 +720,7 @@ runSomething phase_name pgm args -- NOT REACHED return ExitSuccess Just child -> do -- Parent - Just (Exited res) <- getProcessStatus True True child + Just (Exited res) <- getProcessStatus True False child return res #else exit_code <- rawSystem cmd_line -- 1.7.10.4