From c95cb1973d0cebd31d46e29bd0ebfcca5faa5a1a 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 --- common/flatpak-run.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 3aa79cdb..4bd10fc2 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) {