# HG changeset patch # User Richard M. Stallman # Date 758557032 0 # Node ID 466bc8ef8e21c02c3770086fb653e86153e36a12 # Parent b785c3474b47059ef1ff12f7f9debfe7cd072516 (sigchld_handler, status_message): Handle a NULL in sys_siglist. diff -r b785c3474b47 -r 466bc8ef8e21 src/process.c --- a/src/process.c Fri Jan 14 14:16:29 1994 +0000 +++ b/src/process.c Fri Jan 14 14:17:12 1994 +0000 @@ -308,11 +308,18 @@ if (EQ (symbol, Qsignal) || EQ (symbol, Qstop)) { + char *signame = 0; + if (code < NSIG) + { #ifndef VMS - string = build_string (code < NSIG ? sys_siglist[code] : "unknown"); + signame = sys_siglist[code]; #else - string = build_string (code < NSIG ? sys_errlist[code] : "unknown"); + signame = sys_errlist[code]; #endif + } + if (signame == 0) + signame = "unknown"; + string = build_string (signame); string2 = build_string (coredump ? " (core dumped)\n" : "\n"); XSTRING (string)->data[0] = DOWNCASE (XSTRING (string)->data[0]); return concat2 (string, string2); @@ -2827,11 +2834,23 @@ if (WIFEXITED (w)) synch_process_retcode = WRETCODE (w); else if (WIFSIGNALED (w)) + { + int code = WTERMSIG (w); + char *signame = 0; + + if (code < NSIG) + { #ifndef VMS - synch_process_death = (char *) sys_siglist[WTERMSIG (w)]; + signame = sys_siglist[code]; #else - synch_process_death = sys_errlist[WTERMSIG (w)]; + signame = sys_errlist[code]; #endif + } + if (signame == 0) + signame = "unknown"; + + synch_process_death = signame; + } /* Tell wait_reading_process_input that it needs to wake up and look around. */