Commit 6c510ef7 authored by Nils Goroll's avatar Nils Goroll

signal handling for varnishstat in curses mode

Fixes #3088 for varnishstat

note that besides handling SIGHUP, this also adds handling of SIGTERM
and SIGINT, which were also missing.
parent 1f226e6d
......@@ -45,6 +45,7 @@
#include "miniobj.h"
#include "vqueue.h"
#include "vtim.h"
#include "vapi/vsig.h"
#include "varnishstat.h"
#include "vcurses.h"
......@@ -1032,7 +1033,7 @@ do_curses(struct vsm *vsm, struct vsc *vsc)
build_pt_array();
init_hitrate();
while (keep_running) {
while (keep_running && !VSIG_int && !VSIG_term && !VSIG_hup) {
(void)VSC_Iter(vsc, vsm, NULL, NULL);
vsm_status = VSM_Status(vsm);
if (vsm_status & (VSM_MGT_RESTARTED|VSM_WRK_RESTARTED))
......
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