diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-04-13 17:07:04 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-04-13 17:07:04 -0400 |
commit | 8ab861c70226cb06cb2ebe21943e5e5f4c5012ce (patch) | |
tree | 6fb5da05e049d80a41b6c0aa4a6c76feb5dff282 /gcc | |
parent | ccf5d2447aca9ed6eb9c74304b8fc8a458cc8968 (diff) | |
download | gcc-8ab861c70226cb06cb2ebe21943e5e5f4c5012ce.zip gcc-8ab861c70226cb06cb2ebe21943e5e5f4c5012ce.tar.gz gcc-8ab861c70226cb06cb2ebe21943e5e5f4c5012ce.tar.bz2 |
(main, scan_prog_file): Don't call signal on signal names that aren't
defined.
From-SVN: r4135
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/collect2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 37da651..cc0d732 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -757,18 +757,26 @@ main (argc, argv) if (argc < 2) fatal ("no arguments"); +#ifdef SIGQUIT if (signal (SIGQUIT, SIG_IGN) != SIG_IGN) signal (SIGQUIT, handler); +#endif if (signal (SIGINT, SIG_IGN) != SIG_IGN) signal (SIGINT, handler); +#ifdef SIGALRM if (signal (SIGALRM, SIG_IGN) != SIG_IGN) signal (SIGALRM, handler); +#endif +#ifdef SIGHUP if (signal (SIGHUP, SIG_IGN) != SIG_IGN) signal (SIGHUP, handler); +#endif if (signal (SIGSEGV, SIG_IGN) != SIG_IGN) signal (SIGSEGV, handler); +#ifdef SIGBUS if (signal (SIGBUS, SIG_IGN) != SIG_IGN) signal (SIGBUS, handler); +#endif /* Extract COMPILER_PATH and PATH into our prefix list. */ prefix_from_env ("COMPILER_PATH", &cpath); @@ -1361,7 +1369,9 @@ scan_prog_file (prog_name, which_pass) /* Parent context from here on. */ int_handler = (void (*) ())signal (SIGINT, SIG_IGN); +#ifdef SIGQUIT quit_handler = (void (*) ())signal (SIGQUIT, SIG_IGN); +#endif if (close (pipe_fd[1]) < 0) fatal_perror ("close (%d)", pipe_fd[1]); @@ -1419,7 +1429,9 @@ scan_prog_file (prog_name, which_pass) do_wait (nm_file_name); signal (SIGINT, int_handler); +#ifdef SIGQUIT signal (SIGQUIT, quit_handler); +#endif } #endif /* OBJECT_FORMAT_NONE */ |