diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -212,6 +212,21 @@ sigusr1_handler (int sig) } static void +setup_termination_signals (void) +{ + struct sigaction sa; + + sa.sa_handler = SIG_DFL; + sigemptyset (&sa.sa_mask); + sa.sa_flags = 0; + + sigaction (SIGTERM, &sa, NULL); + sigaction (SIGQUIT, &sa, NULL); + sigaction (SIGINT, &sa, NULL); + sigaction (SIGHUP, &sa, NULL); +} + +static void setup_debug_log_signals (void) { struct sigaction sa; @@ -342,6 +357,8 @@ main (int argc, setup_debug_log (debug); + setup_termination_signals (); + g_debug ("initializing console-kit-daemon %s", VERSION); connection = get_system_bus (); |