diff options
| author | Michael Biebl <biebl@debian.org> | 2015-07-14 19:38:58 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-07-14 19:38:58 +0200 |
| commit | 50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (patch) | |
| tree | 6790165f39daee79e2b6c6617483320613493367 /src/dns-manager/nm-dns-plugin.c | |
| parent | f408e27bccfacf347605a8d98649975a68f38a17 (diff) | |
Imported Upstream version 1.0.4 upstream/1.0.4
Diffstat (limited to 'src/dns-manager/nm-dns-plugin.c')
| -rw-r--r-- | src/dns-manager/nm-dns-plugin.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/dns-manager/nm-dns-plugin.c b/src/dns-manager/nm-dns-plugin.c index c684464e..5b95d1c5 100644 --- a/src/dns-manager/nm-dns-plugin.c +++ b/src/dns-manager/nm-dns-plugin.c @@ -28,7 +28,6 @@ #include "nm-dns-plugin.h" #include "nm-logging.h" -#include "nm-posix-signals.h" #include "NetworkManagerUtils.h" typedef struct { @@ -136,20 +135,6 @@ watch_cb (GPid pid, gint status, gpointer user_data) g_signal_emit (self, signals[CHILD_QUIT], 0, status); } -static void -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 DNS plugin here so that it can receive signals. - */ - nm_unblock_posix_signals (NULL); -} - GPid nm_dns_plugin_child_spawn (NMDnsPlugin *self, const char **argv, @@ -183,8 +168,8 @@ nm_dns_plugin_child_spawn (NMDnsPlugin *self, priv->pid = 0; if (g_spawn_async (NULL, (char **) argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, - child_setup, - NULL, &priv->pid, + nm_utils_setpgid, NULL, + &priv->pid, &error)) { nm_log_dbg (LOGD_DNS, "%s started with pid %d", priv->progname, priv->pid); priv->watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) watch_cb, self); |