From 5cde809909b1e3f2bb54f354b74eccf7f1552c62 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 23 Oct 2016 23:00:37 +0200 Subject: [PATCH] Add debug messages to signal handlers Signed-off-by: Joachim Nilsson --- sig.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sig.c b/sig.c index 3ba24375..dd0f9aa7 100644 --- a/sig.c +++ b/sig.c @@ -210,6 +210,7 @@ void do_shutdown(shutop_t op) */ static void sighup_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) { + _d("..."); /* INIT_CMD_RELOAD: 'init q', 'initctl reload', and SIGHUP */ service_reload_dynamic(); } @@ -219,6 +220,7 @@ static void sighup_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) */ static void sigint_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) { + _d("..."); halt = SHUT_REBOOT; service_runlevel(6); } @@ -228,6 +230,7 @@ static void sigint_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) */ static void sigusr1_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) { + _d("..."); halt = SHUT_HALT; service_runlevel(0); } @@ -237,6 +240,7 @@ static void sigusr1_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) */ static void sigusr2_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) { + _d("..."); halt = SHUT_OFF; service_runlevel(0); } @@ -246,6 +250,7 @@ static void sigusr2_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) */ static void sigterm_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) { + _d("..."); halt = SHUT_REBOOT; service_runlevel(6); }