diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-05-13 04:47:29 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-05-13 04:47:29 +0200 |
commit | 127c6e6e696aa0811835663a439170adc8bd7b8c (patch) | |
tree | a850063b7862297a0ca8e85669e24132edd3763a /src/sig_handler.c | |
parent | fixed initscript (diff) |
fix exit-code after signal
Diffstat (limited to 'src/sig_handler.c')
-rw-r--r-- | src/sig_handler.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sig_handler.c b/src/sig_handler.c index cc7276d..fb50000 100644 --- a/src/sig_handler.c +++ b/src/sig_handler.c @@ -116,12 +116,12 @@ int signal_handle() for(sig=1; sig < NSIG; ++sig) { if(sigismember(&set, sig)) { switch(sig) { - case SIGINT: log_printf(NOTICE, "SIG-Int caught, exitting"); return_value = 1; break; - case SIGQUIT: log_printf(NOTICE, "SIG-Quit caught, exitting"); return_value = 1; break; - case SIGTERM: log_printf(NOTICE, "SIG-Term caught, exitting"); return_value = 1; break; - case SIGHUP: log_printf(NOTICE, "SIG-Hup caught"); return_value = 2; break; - case SIGUSR1: log_printf(NOTICE, "SIG-Usr1 caught"); return_value = 3; break; - case SIGUSR2: log_printf(NOTICE, "SIG-Usr2 caught"); return_value = 4; break; + case SIGINT: log_printf(NOTICE, "SIG-Int caught, exitting"); return_value = SIGINT; break; + case SIGQUIT: log_printf(NOTICE, "SIG-Quit caught, exitting"); return_value = SIGQUIT; break; + case SIGTERM: log_printf(NOTICE, "SIG-Term caught, exitting"); return_value = SIGTERM; break; + case SIGHUP: log_printf(NOTICE, "SIG-Hup caught"); return_value = SIGHUP; break; + case SIGUSR1: log_printf(NOTICE, "SIG-Usr1 caught"); return_value = SIGUSR1; break; + case SIGUSR2: log_printf(NOTICE, "SIG-Usr2 caught"); return_value = SIGUSR2; break; default: log_printf(WARNING, "unknown signal %d caught, ignoring", sig); break; } sigdelset(&set, sig); |