diff options
author | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-16 00:58:40 +0000 |
---|---|---|
committer | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-16 00:58:40 +0000 |
commit | 6b917287e08b430ec472330e38cd1711111c7b5d (patch) | |
tree | e6a1cdc10e704951d9a367c7c321e213df085ee0 /gcc/collect2.c | |
parent | e5d00d48832afeed0d8297880905925de13bd3a8 (diff) | |
download | gcc-6b917287e08b430ec472330e38cd1711111c7b5d.tar.gz |
more rigorous SIGCHLD guarding
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 1541f7cbf22..729d62d52ed 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -29,6 +29,9 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" #include <signal.h> +#if ! defined( SIGCHLD ) && defined( SIGCLD ) +# define SIGCHLD SIGCLD +#endif #ifdef vfork /* Autoconf may define this to fork for us. */ # define VFORK_STRING "fork" @@ -869,6 +872,12 @@ main (argc, argv) COLLECT2_HOST_INITIALIZATION; #endif +#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 + /* LC_CTYPE determines the character set used by the terminal so it has be set to output messages correctly. */ |