[project @ 2003-06-05 12:09:52 by panne]
authorpanne <unknown>
Thu, 5 Jun 2003 12:09:52 +0000 (12:09 +0000)
committerpanne <unknown>
Thu, 5 Jun 2003 12:09:52 +0000 (12:09 +0000)
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

index 5ca2765..c8163d9 100644 (file)
@@ -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