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

Merge branch 'wip/denittis/close-fd' into 'master'

launch.c: Close the file descriptors after being forwarded

See merge request steam/steam-runtime-tools!145
parents 2f387276 9de17127
No related branches found
No related tags found
1 merge request!145launch.c: Close the file descriptors after being forwarded
Pipeline #4684 failed
......@@ -744,6 +744,8 @@ main (int argc,
glnx_prefix_error (error, "Can't append fd");
goto out;
}
/* The GUnixFdList keeps a duplicate, so we should release the original */
close (fd);
g_variant_builder_add (&fd_builder, "{uh}", fd, handle);
}
......@@ -839,6 +841,10 @@ main (int argc,
g_debug ("child_pid: %d", child_pid);
/* Release our reference to the fds, so that only the copy we sent over
* D-Bus remains open */
g_clear_object (&fd_list);
g_signal_connect (bus_or_peer_connection, "closed",
G_CALLBACK (connection_closed_cb), loop);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment