all: use G_SPAWN_CLOEXEC_PIPES with g_spawn_async_with_pipes()
G_SPAWN_CLOEXEC_PIPES is supported since glib 2.40, which we already depend on.
This commit is contained in:
@@ -647,7 +647,7 @@ run_netconfig(NMDnsManager *self, GError **error, int *stdin_fd)
|
||||
if (!g_spawn_async_with_pipes(NULL,
|
||||
argv,
|
||||
NULL,
|
||||
G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
G_SPAWN_CLOEXEC_PIPES | G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
NULL,
|
||||
NULL,
|
||||
&pid,
|
||||
|
@@ -5108,7 +5108,7 @@ nm_utils_spawn_helper(const char *const *args,
|
||||
if (!g_spawn_async_with_pipes("/",
|
||||
(char **) NM_MAKE_STRV(LIBEXECDIR "/nm-daemon-helper"),
|
||||
(char **) NM_MAKE_STRV(),
|
||||
G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
G_SPAWN_CLOEXEC_PIPES | G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
NULL,
|
||||
NULL,
|
||||
&info->pid,
|
||||
|
@@ -107,7 +107,8 @@ nmtstc_service_init(void)
|
||||
g_spawn_async_with_pipes(NULL,
|
||||
(char **) args,
|
||||
NULL,
|
||||
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
G_SPAWN_CLOEXEC_PIPES | G_SPAWN_SEARCH_PATH
|
||||
| G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
NULL,
|
||||
NULL,
|
||||
&info->pid,
|
||||
|
@@ -514,7 +514,7 @@ begin_authentication(AuthRequest *request)
|
||||
if (!g_spawn_async_with_pipes(NULL,
|
||||
(char **) helper_argv,
|
||||
NULL,
|
||||
G_SPAWN_STDERR_TO_DEV_NULL,
|
||||
G_SPAWN_CLOEXEC_PIPES | G_SPAWN_STDERR_TO_DEV_NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@@ -787,7 +787,7 @@ try_spawn_vpn_auth_helper(RequestData *request, GPtrArray *secrets)
|
||||
if (!g_spawn_async_with_pipes(NULL,
|
||||
(char **) auth_dialog_argv->pdata,
|
||||
NULL,
|
||||
G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
G_SPAWN_CLOEXEC_PIPES | G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
NULL,
|
||||
NULL,
|
||||
&auth_dialog_pid,
|
||||
|
Reference in New Issue
Block a user