diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2000-07-13 04:43:47 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-07-13 04:43:47 +0000 |
commit | c334349bda917012f51f629988006f9c72b7288a (patch) | |
tree | 6de36bf7b8f48857cc3e90312c8d4589da6c3f6f /gcc/gcc.c | |
parent | dcacfa04fe67a4f0c957d0b37e0c750d2036d34d (diff) | |
download | gcc-c334349bda917012f51f629988006f9c72b7288a.zip gcc-c334349bda917012f51f629988006f9c72b7288a.tar.gz gcc-c334349bda917012f51f629988006f9c72b7288a.tar.bz2 |
gcc.c (execute): If a subprocess gets a fatal signal...
* gcc.c (execute): If a subprocess gets a fatal signal, report
strsignal() of the signal number, and ask for a bug report.
Do not do this for SIGPIPE if there's already been an error.
* tradcpp.c: Don't include signal.h. Don't catch SIGPIPE.
Delete pipe_closed.
From-SVN: r35006
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 43 |
1 files changed, 28 insertions, 15 deletions
@@ -2653,22 +2653,35 @@ execute () if (commands[j].pid == pid) { i++; - if (status != 0) + if (WIFSIGNALED (status)) { - if (WIFSIGNALED (status)) - { - fatal ("Internal compiler error: program %s got fatal signal %d", - commands[j].prog, WTERMSIG (status)); - signal_count++; - ret_code = -1; - } - else if (WIFEXITED (status) - && WEXITSTATUS (status) >= MIN_FATAL_STATUS) - { - if (WEXITSTATUS (status) > greatest_status) - greatest_status = WEXITSTATUS (status); - ret_code = -1; - } +#ifdef SIGPIPE + /* SIGPIPE is a special case. It happens in -pipe mode + when the compiler dies before the preprocessor is + done, or the assembler dies before the compiler is + done. There's generally been an error already, and + this is just fallout. So don't generate another error + unless we would otherwise have succeeded. */ + if (WTERMSIG (status) == SIGPIPE + && (signal_count || greatest_status >= MIN_FATAL_STATUS)) + ; + else +#endif + fatal ("\ +Internal error: %s (program %s)\n\ +Please submit a full bug report.\n\ +See %s for instructions.", + strsignal (WTERMSIG (status)), commands[j].prog, + GCCBUGURL); + signal_count++; + ret_code = -1; + } + else if (WIFEXITED (status) + && WEXITSTATUS (status) >= MIN_FATAL_STATUS) + { + if (WEXITSTATUS (status) > greatest_status) + greatest_status = WEXITSTATUS (status); + ret_code = -1; } #ifdef HAVE_GETRUSAGE if (report_times && ut + st != 0) |