Commit 911c8291 authored by Christian Hergert's avatar Christian Hergert

threading: add support for FLATPAK_HOST_COMMAND_FLAGS_WATCH_BUS

This helps ensure our host subprocesses are reaped with Builder when it
has exited.
parent 6b55406a
......@@ -38,9 +38,8 @@
#include "ide-flatpak-subprocess-private.h"
#include "ide-gtask-private.h"
#ifndef FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV
# define FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV (1 << 0)
#endif
#define FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV (1 << 0)
#define FLATPAK_HOST_COMMAND_FLAGS_WATCH_BUS (1 << 1)
/*
* One very non-ideal thing about this implementation is that we use a new
......@@ -1193,6 +1192,7 @@ ide_flatpak_subprocess_initable_init (GInitable *initable,
gint stdout_handle = -1;
gint stderr_handle = -1;
gboolean ret = FALSE;
guint flags = FLATPAK_HOST_COMMAND_FLAGS_WATCH_BUS;
IDE_ENTRY;
......@@ -1230,6 +1230,9 @@ ide_flatpak_subprocess_initable_init (GInitable *initable,
g_dbus_connection_set_exit_on_close (self->connection, FALSE);
if (self->clear_env)
flags |= FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV;
/*
* Handle STDIN for the process.
......@@ -1471,7 +1474,7 @@ ide_flatpak_subprocess_initable_init (GInitable *initable,
self->argv,
g_variant_builder_end (g_steal_pointer (&fd_builder)),
g_variant_builder_end (g_steal_pointer (&env_builder)),
self->clear_env ? FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV : 0);
flags);
g_variant_take_ref (params);
#ifdef IDE_ENABLE_TRACE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment