aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/fixincl.c
diff options
context:
space:
mode:
authorBruce Korb <bkorb@gnu.org>2001-03-16 00:58:40 +0000
committerBruce Korb <korbb@gcc.gnu.org>2001-03-16 00:58:40 +0000
commit798bdf70eee560a3ca67a44dbb64397ee709b438 (patch)
treee6a1cdc10e704951d9a367c7c321e213df085ee0 /gcc/fixinc/fixincl.c
parent243baa2871d2f28673f3b17282d0efb278b9684d (diff)
downloadgcc-798bdf70eee560a3ca67a44dbb64397ee709b438.zip
gcc-798bdf70eee560a3ca67a44dbb64397ee709b438.tar.gz
gcc-798bdf70eee560a3ca67a44dbb64397ee709b438.tar.bz2
more rigorous SIGCHLD guarding
From-SVN: r40522
Diffstat (limited to 'gcc/fixinc/fixincl.c')
-rw-r--r--gcc/fixinc/fixincl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c
index 88fffbd..5f1e363 100644
--- a/gcc/fixinc/fixincl.c
+++ b/gcc/fixinc/fixincl.c
@@ -29,6 +29,9 @@ Boston, MA 02111-1307, USA. */
#endif
#include <signal.h>
+#if ! defined( SIGCHLD ) && defined( SIGCLD )
+# define SIGCHLD SIGCLD
+#endif
#ifndef SEPARATE_FIX_PROC
#include "server.h"
#endif
@@ -249,6 +252,12 @@ ENV_TABLE
exit (EXIT_FAILURE);
}
+#ifdef SIGCHLD
+ /* We *MUST* set SIGCHLD to SIG_DFL so that the wait4() call will
+ receive the signal. A different setting is inheritable */
+ signal (SIGCHLD, SIG_DFL);
+#endif
+
#define _ENV_(v,m,n,t) { tSCC var[] = n; \
v = getenv (var); if (m && (v == NULL)) { \
fprintf (stderr, var_not_found, var); \