diff options
Diffstat (limited to 'src/dnsmasq-manager/nm-dnsmasq-manager.c')
| -rw-r--r-- | src/dnsmasq-manager/nm-dnsmasq-manager.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/dnsmasq-manager/nm-dnsmasq-manager.c b/src/dnsmasq-manager/nm-dnsmasq-manager.c index 2f38ea71..a85631bc 100644 --- a/src/dnsmasq-manager/nm-dnsmasq-manager.c +++ b/src/dnsmasq-manager/nm-dnsmasq-manager.c @@ -32,7 +32,6 @@ #include "nm-dnsmasq-utils.h" #include "nm-logging.h" #include "nm-glib-compat.h" -#include "nm-posix-signals.h" #include "nm-utils.h" #include "NetworkManagerUtils.h" @@ -297,20 +296,6 @@ create_dm_cmd_line (const char *iface, } static void -dm_child_setup (gpointer user_data G_GNUC_UNUSED) -{ - /* We are in the child process at this point */ - pid_t pid = getpid (); - setpgid (pid, pid); - - /* - * We blocked signals in main(). We need to restore original signal - * mask for dnsmasq here so that it can receive signals. - */ - nm_unblock_posix_signals (NULL); -} - -static void kill_existing_for_iface (const char *iface, const char *pidfile) { char *contents = NULL; @@ -374,9 +359,9 @@ nm_dnsmasq_manager_start (NMDnsMasqManager *manager, priv->pid = 0; if (!g_spawn_async (NULL, (char **) dm_cmd->array->pdata, NULL, - G_SPAWN_DO_NOT_REAP_CHILD, - dm_child_setup, - NULL, &priv->pid, error)) { + G_SPAWN_DO_NOT_REAP_CHILD, + nm_utils_setpgid, NULL, + &priv->pid, error)) { goto out; } |