diff options
Diffstat (limited to 'src/dhcp-manager/nm-dhcp-dhclient.c')
| -rw-r--r-- | src/dhcp-manager/nm-dhcp-dhclient.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index 504e8d5d..91515dda 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -41,7 +41,6 @@ #include "nm-logging.h" #include "nm-dhcp-dhclient-utils.h" #include "nm-dhcp-manager.h" -#include "nm-posix-signals.h" #include "NetworkManagerUtils.h" #include "nm-dhcp-listener.h" #include "gsystem-local-alloc.h" @@ -301,20 +300,6 @@ create_dhclient_config (const char *iface, } -static void -dhclient_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 dhclient here so that it can receive signals. - */ - nm_unblock_posix_signals (NULL); -} - static gboolean dhclient_start (NMDhcpClient *client, const char *mode_opt, @@ -457,7 +442,7 @@ dhclient_start (NMDhcpClient *client, if (g_spawn_async (NULL, (char **) argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, - &dhclient_child_setup, NULL, &pid, &error)) { + nm_utils_setpgid, NULL, &pid, &error)) { g_assert (pid > 0); nm_log_info (log_domain, "dhclient started with pid %d", pid); if (release == FALSE) |