• Poul-Henning Kamp's avatar
    Don't use SIGHUP, it fails if varnishtest is run under nohup(1) · feac0301
    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
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
devscripts Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
.gitignore Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.inc.phk Loading commit data...
Makefile.phk Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
config.phk Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...