Commit 7a77c485 authored by Evangelos Foutras's avatar Evangelos Foutras 🐱
Browse files

Stop using G_SPAWN_CHILD_INHERITS_STDIN spawn flag

When this flag gets passed to vte_terminal_spawn_async(), vte 0.62 warns
about it being part of the flag set returned by forbidden_spawn_flags().

Looking at the minimum required version, vte 0.38, vte itself used to
automatically add G_SPAWN_CHILD_INHERITS_STDIN to the spawn flags. It
stopped doing that in the 0.47.90 release and the commit message was:

  (GNOME/vte) commit b517d20379c7a665e897f925ca3ecb7b778364f2

  pty: Do not pass G_SPAWN_CHILD_INHERITS_STDIN

  This makes no sense at all, since we redirect stdin to the PTY anyway.
  Fixes a FIXME!

So, considering that:

  - vte used to add this flag automatically in past
  - vte dropped the flag as unnecessary in v0.47.90
  - vte 0.62 is warning about it and is ignoring it
  - the warning might be upgraded to a g_return_if_fail() in the future

It seems reasonable and safe to stop using the flag ourselves. :)

Fixes: apps/xfce4-terminal#86
parent 1edbd53b
......@@ -1927,7 +1927,7 @@ terminal_screen_launch_child (TerminalScreen *screen)
gchar **argv2;
guint i, argc;
VtePtyFlags pty_flags = VTE_PTY_DEFAULT;
GSpawnFlags spawn_flags = G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_SEARCH_PATH;
GSpawnFlags spawn_flags = G_SPAWN_SEARCH_PATH;
terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
......
Supports Markdown
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