[gnome-builder] libide/foundry: disable PTY setup when running on host
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/foundry: disable PTY setup when running on host
- Date: Thu, 14 Jul 2022 22:26:19 +0000 (UTC)
commit 3421052e24ac136d0879eff010ecba5212bfe9fe
Author: Christian Hergert <chergert redhat com>
Date: Thu Jul 14 15:26:12 2022 -0700
libide/foundry: disable PTY setup when running on host
Since we use flatpak-spawn to run on the host, we want to avoid setting
up the PTY and allow the flatpak session helper to do that on the other
side (in a new PTY namespace).
src/libide/foundry/ide-run-context.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/foundry/ide-run-context.c b/src/libide/foundry/ide-run-context.c
index 8271c47db..58406aa96 100644
--- a/src/libide/foundry/ide-run-context.c
+++ b/src/libide/foundry/ide-run-context.c
@@ -50,6 +50,7 @@ struct _IdeRunContext
GQueue layers;
IdeRunContextLayer root;
guint ended : 1;
+ guint setup_tty : 1;
};
G_DEFINE_FINAL_TYPE (IdeRunContext, ide_run_context, G_TYPE_OBJECT)
@@ -199,6 +200,8 @@ ide_run_context_init (IdeRunContext *self)
ide_run_context_layer_init (&self->root);
g_queue_push_head_link (&self->layers, &self->root.qlink);
+
+ self->setup_tty = TRUE;
}
void
@@ -292,10 +295,13 @@ ide_run_context_push_host (IdeRunContext *self)
g_return_if_fail (IDE_IS_RUN_CONTEXT (self));
if (ide_is_flatpak ())
- ide_run_context_push (self,
- ide_run_context_host_handler,
- NULL,
- NULL);
+ {
+ self->setup_tty = FALSE;
+ ide_run_context_push (self,
+ ide_run_context_host_handler,
+ NULL,
+ NULL);
+ }
}
static gboolean
@@ -1127,6 +1133,8 @@ ide_run_context_end (IdeRunContext *self,
}
}
+ ide_subprocess_launcher_set_setup_tty (launcher, self->setup_tty);
+
return g_steal_pointer (&launcher);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]