diff --git a/pressure-vessel/flatpak-bwrap.c b/pressure-vessel/flatpak-bwrap.c
index 9327287615908e704dbe771084c6fcc7164395b7..59e6710d553ee9fd689fb303a2646c56722184b4 100644
--- a/pressure-vessel/flatpak-bwrap.c
+++ b/pressure-vessel/flatpak-bwrap.c
@@ -507,7 +507,13 @@ flatpak_bwrap_child_setup (GArray *fd_array,
   int i;
 
   if (close_fd_workaround)
+#if 0
     flatpak_close_fds_workaround (3);
+#else
+    /* pressure-vessel-specific change for now, but see
+     * https://github.com/flatpak/flatpak/pull/5687 */
+    g_fdwalk_set_cloexec (3);
+#endif
 
   /* If no fd_array was specified, don't care. */
   if (fd_array == NULL)
diff --git a/pressure-vessel/flatpak-utils-base.c b/pressure-vessel/flatpak-utils-base.c
index 92872352b46a9ecef2957d9f0647e3c86dd0f3c2..d654f988e37873d4fbfedf4e3f99040d01b0b359 100644
--- a/pressure-vessel/flatpak-utils-base.c
+++ b/pressure-vessel/flatpak-utils-base.c
@@ -120,6 +120,7 @@ flatpak_canonicalize_filename (const char *path)
   return g_file_get_path (file);
 }
 
+#if 0
 /* There is a dead-lock in glib versions before 2.60 when it closes
  * the fds. See:  https://gitlab.gnome.org/GNOME/glib/merge_requests/490
  * This was hitting the test-suite a lot, so we work around it by using
@@ -135,3 +136,4 @@ flatpak_close_fds_workaround (int start_fd)
   for (fd = start_fd; fd < max_open_fds; fd++)
     fcntl (fd, F_SETFD, FD_CLOEXEC);
 }
+#endif
diff --git a/pressure-vessel/wrap-setup.c b/pressure-vessel/wrap-setup.c
index cc7b20bd10fec638b789d8ff11f44a8ec7fb390c..7f7b897cf38e8cb0815b4f092b4e37de8c2da4f6 100644
--- a/pressure-vessel/wrap-setup.c
+++ b/pressure-vessel/wrap-setup.c
@@ -98,8 +98,8 @@ test_bwrap_executable (const char *bwrap_executable,
   g_ptr_array_add (argv, (char *) "true");
   g_ptr_array_add (argv, NULL);
 
-  /* 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_sync (NULL,  /* cwd */
                      (gchar **) argv->pdata,
                      NULL,  /* environ */