From 8ae7e1b2da35b5374a95b953220f45dbe5043296 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sat, 22 Feb 2014 11:22:31 +0100 Subject: flowtop: Exit gracefully for all possible termination signals Handle all termination signals that we're allowed to handle (SIGKILL can't be handled) in order to exit gracefully in any regular termination case. Signed-off-by: Tobias Klauser --- flowtop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'flowtop.c') diff --git a/flowtop.c b/flowtop.c index d0b9a80..5b0a88c 100644 --- a/flowtop.c +++ b/flowtop.c @@ -211,6 +211,8 @@ static void signal_handler(int number) { switch (number) { case SIGINT: + case SIGQUIT: + case SIGTERM: sigint = 1; break; case SIGHUP: @@ -1171,6 +1173,8 @@ int main(int argc, char **argv) rcu_init(); register_signal(SIGINT, signal_handler); + register_signal(SIGQUIT, signal_handler); + register_signal(SIGTERM, signal_handler); register_signal(SIGHUP, signal_handler); init_geoip(1); -- cgit v1.2.3-54-g00ecf nge='this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')