diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c index c2785e75fc9..25b0ef2c22c 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -308,11 +308,18 @@ status_message (status) | |||
| 308 | 308 | ||
| 309 | if (EQ (symbol, Qsignal) || EQ (symbol, Qstop)) | 309 | if (EQ (symbol, Qsignal) || EQ (symbol, Qstop)) |
| 310 | { | 310 | { |
| 311 | char *signame = 0; | ||
| 312 | if (code < NSIG) | ||
| 313 | { | ||
| 311 | #ifndef VMS | 314 | #ifndef VMS |
| 312 | string = build_string (code < NSIG ? sys_siglist[code] : "unknown"); | 315 | signame = sys_siglist[code]; |
| 313 | #else | 316 | #else |
| 314 | string = build_string (code < NSIG ? sys_errlist[code] : "unknown"); | 317 | signame = sys_errlist[code]; |
| 315 | #endif | 318 | #endif |
| 319 | } | ||
| 320 | if (signame == 0) | ||
| 321 | signame = "unknown"; | ||
| 322 | string = build_string (signame); | ||
| 316 | string2 = build_string (coredump ? " (core dumped)\n" : "\n"); | 323 | string2 = build_string (coredump ? " (core dumped)\n" : "\n"); |
| 317 | XSTRING (string)->data[0] = DOWNCASE (XSTRING (string)->data[0]); | 324 | XSTRING (string)->data[0] = DOWNCASE (XSTRING (string)->data[0]); |
| 318 | return concat2 (string, string2); | 325 | return concat2 (string, string2); |
| @@ -2827,11 +2834,23 @@ sigchld_handler (signo) | |||
| 2827 | if (WIFEXITED (w)) | 2834 | if (WIFEXITED (w)) |
| 2828 | synch_process_retcode = WRETCODE (w); | 2835 | synch_process_retcode = WRETCODE (w); |
| 2829 | else if (WIFSIGNALED (w)) | 2836 | else if (WIFSIGNALED (w)) |
| 2837 | { | ||
| 2838 | int code = WTERMSIG (w); | ||
| 2839 | char *signame = 0; | ||
| 2840 | |||
| 2841 | if (code < NSIG) | ||
| 2842 | { | ||
| 2830 | #ifndef VMS | 2843 | #ifndef VMS |
| 2831 | synch_process_death = (char *) sys_siglist[WTERMSIG (w)]; | 2844 | signame = sys_siglist[code]; |
| 2832 | #else | 2845 | #else |
| 2833 | synch_process_death = sys_errlist[WTERMSIG (w)]; | 2846 | signame = sys_errlist[code]; |
| 2834 | #endif | 2847 | #endif |
| 2848 | } | ||
| 2849 | if (signame == 0) | ||
| 2850 | signame = "unknown"; | ||
| 2851 | |||
| 2852 | synch_process_death = signame; | ||
| 2853 | } | ||
| 2835 | 2854 | ||
| 2836 | /* Tell wait_reading_process_input that it needs to wake up and | 2855 | /* Tell wait_reading_process_input that it needs to wake up and |
| 2837 | look around. */ | 2856 | look around. */ |