opnsense-ports/sysutils/consolekit/files/patch-src_main.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

33 lines
819 B
C

--- src/main.c.orig 2007-11-08 15:05:55.000000000 -0500
+++ src/main.c 2007-11-08 15:07:39.000000000 -0500
@@ -226,6 +226,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;
@@ -300,6 +315,8 @@ main (int argc,
setup_debug_log (debug);
+ setup_termination_signals ();
+
connection = get_system_bus ();
if (connection == NULL) {
goto out;