Commit df9e6a5d authored by Mike Hibler's avatar Mike Hibler
Browse files

The list we were using for signal names under linux was actually a list

of signal descriptions.  This caused us to never match and revealed a
bug when we hit the end of the list: strcasecmp blows up when passed a
NULL argument.

Now we defined our own list of signal names (with no NULL entries :-)
parent 48d21d2e
......@@ -418,8 +418,42 @@ stop_program(struct proginfo *pinfo, char *args)
* Signal a program.
*/
#ifdef linux
extern const char * const sys_siglist[];
#define sys_signame sys_siglist
#undef NSIG
#define NSIG 32
const char *const sys_signame[NSIG] = {
"Signal 0",
"hup", /* SIGHUP */
"int", /* SIGINT */
"quit", /* SIGQUIT */
"ill", /* SIGILL */
"trap", /* SIGTRAP */
"abrt", /* SIGABRT */
"bus", /* SIGBUS */
"fpe", /* SIGFPE */
"kill", /* SIGKILL */
"usr1", /* SIGUSR1 */
"segv", /* SIGSEGV */
"usr2", /* SIGUSR2 */
"pipe", /* SIGPIPE */
"alrm", /* SIGALRM */
"term", /* SIGTERM */
"stkflt", /* SIGSTKFLT */
"chld", /* SIGCHLD */
"cont", /* SIGCONT */
"stop", /* SIGSTOP */
"tstp", /* SIGTSTP */
"ttin", /* SIGTTIN */
"ttou", /* SIGTTOU */
"urg", /* SIGURG */
"xcpu", /* SIGXCPU */
"xfsz", /* SIGXFSZ */
"vtalrm", /* SIGVTALRM */
"prof", /* SIGPROF */
"winch", /* SIGWINCH */
"io", /* SIGIO */
"pwr", /* SIGPWR */
"sys", /* SIGSYS */
};
#endif
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment