Commit b3db092c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Also trap SIGTERM


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@677 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 3dddc75c
......@@ -115,6 +115,7 @@ start_child(void)
setproctitle("Varnish-Chld");
signal(SIGINT, SIG_DFL);
signal(SIGTERM, SIG_DFL);
child_main();
exit (1);
......@@ -277,6 +278,13 @@ mgt_run(int dflag)
if (dflag)
mgt_cli_setup(0, 1, 1);
e = ev_new();
assert(e != NULL);
e->sig = SIGTERM;
e->callback = mgt_sigint;
e->name = "mgt_sigterm";
AZ(ev_add(mgt_evb, e));
e = ev_new();
assert(e != NULL);
e->sig = SIGINT;
......
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