diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-02-22 11:22:31 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2014-02-22 11:22:31 +0100 |
commit | 8ae7e1b2da35b5374a95b953220f45dbe5043296 (patch) | |
tree | f0a7cbc404743beaa109a56327a676b45e0d995d /flowtop.c | |
parent | 57bd9677a2cb2c7344bc6a72091e707cf43a73f0 (diff) |
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 <tklauser@distanz.ch>
Diffstat (limited to 'flowtop.c')
-rw-r--r-- | flowtop.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |