forked from Mirrors/flatpak-builder
utils: clear GUnixFDList before entering main loop
If we do not clear the FDList before entering the main loop, the splice async command may not complete because the pipe fd is still held. This fixes an issue where builder_maybe_host_spawnv() hangs indefinitely when run inside a Flatpak application. Closes: #100 Approved by: alexlarssontingping/wmclass
parent
63e0722cb0
commit
1929fd1cc6
|
@ -1575,6 +1575,11 @@ builder_host_spawnv (GFile *dir,
|
|||
g_variant_get (ret, "(u)", &client_pid);
|
||||
data.client_pid = client_pid;
|
||||
|
||||
/* Drop the FDList immediately or splice_async() may not
|
||||
* complete when the peer process exists, causing us to hang.
|
||||
*/
|
||||
g_clear_object (&fd_list);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
|
||||
g_source_remove (sigterm_id);
|
||||
|
|
Loading…
Reference in New Issue