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.
This commit is contained in:
Thomas Haller
2015-06-25 21:10:32 +02:00
parent c2754ede5c
commit caed15e082
7 changed files with 77 additions and 29 deletions

View File

@@ -205,16 +205,16 @@ _init_nm_debug (const char *debug)
}
void
nm_main_config_reload ()
nm_main_config_reload (int signal)
{
nm_log_info (LOGD_CORE, "reload configuration...");
nm_log_info (LOGD_CORE, "reload configuration (signal %s)...", strsignal (signal));
/* The signal handler thread is only installed after
* creating NMConfig instance, and on shut down we
* no longer run the mainloop (to reach this point).
*
* Hence, a NMConfig singleton instance must always be
* available. */
nm_config_reload (nm_config_get ());
nm_config_reload (nm_config_get (), signal);
}
static void