SIGCHLD may be initially ignored, if the process that started (exec'd
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 21 Feb 1993 00:00:58 +0000 (00:00 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 21 Feb 1993 00:00:58 +0000 (00:00 +0000)
to) scheme had set it to SIG_IGN.

v7/src/microcode/uxsig.c

index d1a568c380372cf41146a40ac865f0590ac26580..5bd8ed6b0a2da865642c6fe2e2019e6cb3392daa 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxsig.c,v 1.24 1993/02/06 05:43:53 gjr Exp $
+$Id: uxsig.c,v 1.25 1993/02/21 00:00:58 gjr Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -621,11 +621,16 @@ DEFUN (bind_handler, (signo, handler),
        int signo AND
        Tsignal_handler handler)
 {
-  if ((signo != 0)
+  Tsignal_handler
+    old_handler = ((signo == 0) ? SIG_DFL : (current_handler (signo)));
+
+  if ((signo != 0) 
+      && ((old_handler == SIG_DFL)
+         || ((old_handler == SIG_IGN) && (signo == SIGCHLD)))
       && ((handler != ((Tsignal_handler) sighnd_stop))
-         || (UX_SC_JOB_CONTROL ()))
-      && ((current_handler (signo)) == SIG_DFL))
+         || (UX_SC_JOB_CONTROL ())))
     INSTALL_HANDLER (signo, handler);
+  return;
 }
 
 void