-
Poul-Henning Kamp authored
We recognize only the most famous signals by name SIGTERM, SIGINT and SIGKILL, if you want a special signal you will have to use "-15" or whatever. The primary reason for this is that there is still no portable API for translating "SIGXXX" to an integer. It used to be that bin/kill.c contained an array: const char *const sys_signame[NSIG] = { [0] = "Signal 0", [SIGHUP] = "HUP", [SIGINT] = "INT", [SIGQUIT] = "QUIT", [SIGILL] = "ILL", [...] BSD unix sensibly moved this into libc, to avoid duplicating this all over the place, but Linux has not done that. The right way to do this, would have been to have <signal.h> contain a table: #ifdef SIGNAL_DOC(n,s,l) SIGNAL_DOC(1, "HUP", "Hangup") SIGNAL_DOC(2, "INT", "Interrupt") ... #endif That way nobody would ever need another #ifdef SIGFOO. Anyway... Rather than pointlessly add a semi-complete list of signals no sensible person should ever use in a varnishtest (SIGWINCH anybody ?) we support the famous three by name, and the rest by number.
feac0301