summaryrefslogtreecommitdiff
path: root/src/sig_handler.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2015-05-13 19:20:13 +0000
committerChristian Pointner <equinox@anytun.org>2015-05-13 19:20:13 +0000
commit67eb0a32f8b2504ef4abeb26d6bcc11454ada5fd (patch)
treec37bbe0625c5cfb2aad39fb16ee8e5c7edc64348 /src/sig_handler.c
parentmake prefix variable more standard compliant (diff)
fixed return code after signal
Diffstat (limited to 'src/sig_handler.c')
-rw-r--r--src/sig_handler.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sig_handler.c b/src/sig_handler.c
index 5de168e..f23d070 100644
--- a/src/sig_handler.c
+++ b/src/sig_handler.c
@@ -139,10 +139,10 @@ 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 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"); break;
case SIGUSR2: log_printf(NOTICE, "SIG-Usr2 caught"); break;
default: log_printf(WARNING, "unknown signal %d caught, ignoring", sig); break;