From d1d53eb7b19b376dc00d213285fbed60192ffeac Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Sun, 2 Aug 2020 01:05:41 -0500 Subject: [PATCH] run: Avoid hanging if xdg-dbus-proxy startup fails (cherry picked from commit c95cb1973d0cebd31d46e29bd0ebfcca5faa5a1a) --- common/flatpak-run.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 73949cca..72d552b5 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -987,6 +987,10 @@ start_dbus_proxy (FlatpakBwrap *app_bwrap, NULL, error)) return FALSE; + /* The write end can be closed now, otherwise the read below will hang of xdg-dbus-proxy + fails to start. */ + g_clear_pointer (&proxy_bwrap, flatpak_bwrap_free); + /* Sync with proxy, i.e. wait until its listening on the sockets */ if (read (sync_fds[0], &x, 1) != 1) {