about summary refs log tree commit diff
path: root/src/main-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-12-24 00:25:15 +0100
committerMichael Biebl <biebl@debian.org>2015-12-24 00:25:15 +0100
commit95fc418c29eaf71c43ee0dddc4515580b9ec1461 (patch)
treec785190da048e63173bd573d7e8c565f3d28488d /src/main-utils.c
parent46654959ce8acc3b92a92e931920365c3b2dab0d (diff)
parent54f6333410ffd570e62717d9e77c5c987175e397 (diff)
Merge tag 'upstream/1.0.10'
Upstream version 1.0.10
Diffstat (limited to 'src/main-utils.c')
-rw-r--r--src/main-utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main-utils.c b/src/main-utils.c
index b0d8df3e..da327c40 100644
--- a/src/main-utils.c
+++ b/src/main-utils.c
@@ -84,8 +84,11 @@ nm_main_utils_setup_signals (GMainLoop *main_loop)
 	signal (SIGPIPE, SIG_IGN);
 
 	g_unix_signal_add (SIGHUP, sighup_handler, GINT_TO_POINTER (SIGHUP));
-	g_unix_signal_add (SIGUSR1, sighup_handler, GINT_TO_POINTER (SIGUSR1));
-	g_unix_signal_add (SIGUSR2, sighup_handler, GINT_TO_POINTER (SIGUSR2));
+	if (nm_glib_check_version (2, 36, 0)) {
+		g_unix_signal_add (SIGUSR1, sighup_handler, GINT_TO_POINTER (SIGUSR1));
+		g_unix_signal_add (SIGUSR2, sighup_handler, GINT_TO_POINTER (SIGUSR2));
+	} else
+		nm_log_warn (LOGD_CORE, "glib-version: cannot handle SIGUSR1 and SIGUSR2 signals. Consider upgrading glib to 2.36.0 or newer");
 	g_unix_signal_add (SIGINT, sigint_handler, main_loop);
 	g_unix_signal_add (SIGTERM, sigterm_handler, main_loop);
 }