summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2014-10-04 10:37:46 +0300
committerEric Koegel <eric.koegel@gmail.com>2014-10-04 10:37:46 +0300
commit16d595f69c0a93a5c29be24c8964462c8311efa6 (patch)
treedae2e6a4fb9e6e1a5984fdc805d468625edfa435 /src/main.c
parent4d5d0c369467f50a41e22b94799c16eaf7e2165e (diff)
downloadConsoleKit2-16d595f69c0a93a5c29be24c8964462c8311efa6.tar.gz
Improve FreeBSD support
Include the patches listed in: http://svnweb.freebsd.org/ports/head/sysutils/consolekit/files/ Credit goes to the FreeBSD team for this work.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 23a4a15..30860b3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 ();