Mercurial > emacs
comparison src/process.c @ 5579:466bc8ef8e21
(sigchld_handler, status_message): Handle a NULL in sys_siglist.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 14 Jan 1994 14:17:12 +0000 |
| parents | fd7524d61a8d |
| children | 1322c4daeda2 |
comparison
equal
deleted
inserted
replaced
| 5578:b785c3474b47 | 5579:466bc8ef8e21 |
|---|---|
| 306 | 306 |
| 307 decode_status (status, &symbol, &code, &coredump); | 307 decode_status (status, &symbol, &code, &coredump); |
| 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); |
| 319 } | 326 } |
| 320 else if (EQ (symbol, Qexit)) | 327 else if (EQ (symbol, Qexit)) |
| 2825 | 2832 |
| 2826 /* Report the status of the synchronous process. */ | 2833 /* Report the status of the synchronous process. */ |
| 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. */ |
| 2838 if (input_available_clear_time) | 2857 if (input_available_clear_time) |
| 2839 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); | 2858 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); |
