diff options
author | Dan Winship <danw@redhat.com> | 2015-01-12 15:43:56 -0500 |
---|---|---|
committer | Dan Winship <danw@redhat.com> | 2015-01-19 11:29:13 -0500 |
commit | c22e3f327aac18c0b3f2ab76fc6b60fbb467d898 (patch) | |
tree | 526ddc71c1959791464396427761a4a50943d2bc /src/nm-activation-request.c | |
parent | 3d068724da97adf2c56a42893f8aa9a26a5aea5d (diff) | |
download | NetworkManager-c22e3f327aac18c0b3f2ab76fc6b60fbb467d898.tar.gz |
core, dispatcher: drop unnecessary setpgid() calls
There's no point in calling setpgid() on short-lived processes, so
remove the setpgid() calls when spawning dispatcher scripts, iptables,
iscsiadmin, and netconf.
Diffstat (limited to 'src/nm-activation-request.c')
-rw-r--r-- | src/nm-activation-request.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index d6ed34fdae..2c084b874e 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -195,14 +195,6 @@ clear_share_rules (NMActRequest *req) priv->share_rules = NULL; } -static void -share_child_setup (gpointer user_data G_GNUC_UNUSED) -{ - /* We are in the child process at this point */ - pid_t pid = getpid (); - setpgid (pid, pid); -} - void nm_act_request_set_shared (NMActRequest *req, gboolean shared) { @@ -240,7 +232,7 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared) nm_log_info (LOGD_SHARING, "Executing: %s", cmd); if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, - share_child_setup, NULL, NULL, NULL, &status, &error)) { + NULL, NULL, NULL, NULL, &status, &error)) { nm_log_warn (LOGD_SHARING, "Error executing command: (%d) %s", error ? error->code : -1, (error && error->message) ? error->message : "(unknown)"); |