From 3c4ed01b18ef858de0bd1baaaa583c370ee00c12 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Sun, 8 May 2022 18:16:17 +0900 Subject: Cygwin: pty: Fix timing of creating invisible console. - Previously, invisible console was created in fixup_after_exec(). However, actually this should be done in fixup_after_fork(). this patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index b9cc973..b419cbd 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2518,6 +2518,8 @@ fhandler_pty_slave::setup_locale (void) void fhandler_pty_slave::fixup_after_fork (HANDLE parent) { + create_invisible_console (); + // fork_fixup (parent, inuse, "inuse"); // fhandler_pty_common::fixup_after_fork (parent); report_tty_counts (this, "inherited", ""); @@ -2527,7 +2529,6 @@ void fhandler_pty_slave::fixup_after_exec () { reset_switch_to_pcon (); - create_invisible_console (); if (!close_on_exec ()) fixup_after_fork (NULL); /* No parent handle required. */ -- cgit v1.1