Skip to content
Snippets Groups Projects
Commit 9b397fec authored by Simon McVittie's avatar Simon McVittie
Browse files

pv-adverb: Use g_fdwalk_set_cloexec() backport


This is functionally equivalent to flatpak_close_fds_workaround(),
but more clearly async-signal-safe.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent f0abd8a2
Branches
Tags
1 merge request!671Use libglnx g_fdwalk_set_cloexec() backport
......@@ -116,7 +116,7 @@ child_setup_cb (gpointer user_data)
if (data != NULL)
{
/* Make all other file descriptors close-on-exec */
flatpak_close_fds_workaround (3);
g_fdwalk_set_cloexec (3);
for (j = 0; j < data->n_pass_fds; j++)
{
......@@ -1354,8 +1354,8 @@ main (int argc,
fflush (stdout);
fflush (stderr);
/* We use LEAVE_DESCRIPTORS_OPEN to work around a deadlock in older GLib,
* see flatpak_close_fds_workaround */
/* We use LEAVE_DESCRIPTORS_OPEN and set CLOEXEC in the child_setup,
* to work around a deadlock in GLib < 2.60 */
if (!g_spawn_async (NULL, /* working directory */
(char **) wrapped_command->argv->pdata,
wrapped_command->envp,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment