summaryrefslogtreecommitdiff
path: root/src/main-utils.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-06-25 21:10:32 +0200
committerThomas Haller <thaller@redhat.com>2015-06-25 22:02:18 +0200
commitcaed15e082efe0af2db3d8a88f72d27640fb381f (patch)
tree96a1349a32c139df507a9adcfc5bc9f77f3f0518 /src/main-utils.c
parentc2754ede5cc26a76e5804c09003c2175ef48cf6a (diff)
downloadNetworkManager-caed15e082efe0af2db3d8a88f72d27640fb381f.tar.gz
config: pass signals to nm_config_reload()
Also react on SIGUSR1 and SIGUSR2, beside SIGHUP. Only for SIGHUP actually reload the configuration from disc. For the other signals only emit a config-changed signal.
Diffstat (limited to 'src/main-utils.c')
-rw-r--r--src/main-utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main-utils.c b/src/main-utils.c
index 5378ca97a1..b0d8df3efa 100644
--- a/src/main-utils.c
+++ b/src/main-utils.c
@@ -44,7 +44,7 @@
static gboolean
sighup_handler (gpointer user_data)
{
- nm_main_config_reload ();
+ nm_main_config_reload (GPOINTER_TO_INT (user_data));
return G_SOURCE_CONTINUE;
}
@@ -83,7 +83,9 @@ nm_main_utils_setup_signals (GMainLoop *main_loop)
signal (SIGPIPE, SIG_IGN);
- g_unix_signal_add (SIGHUP, sighup_handler, NULL);
+ 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));
g_unix_signal_add (SIGINT, sigint_handler, main_loop);
g_unix_signal_add (SIGTERM, sigterm_handler, main_loop);
}