From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id CB2A6385736F; Sun, 8 May 2022 11:07:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB2A6385736F Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Takashi Yano To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Fix timing of creating invisible console. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/cygwin-3_3-branch X-Git-Oldrev: ac2f7f888c3eba20941f5e0cc1c4bb5fd523e730 X-Git-Newrev: 3c4ed01b18ef858de0bd1baaaa583c370ee00c12 Message-Id: <20220508110716.CB2A6385736F@sourceware.org> Date: Sun, 8 May 2022 11:07:16 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2022 11:07:16 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D3c4ed01b18e= f858de0bd1baaaa583c370ee00c12 commit 3c4ed01b18ef858de0bd1baaaa583c370ee00c12 Author: Takashi Yano Date: Sun May 8 18:16:17 2022 +0900 Cygwin: pty: Fix timing of creating invisible console. =20 - Previously, invisible console was created in fixup_after_exec(). However, actually this should be done in fixup_after_fork(). this patch fixes the issue. Diff: --- 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 b9cc9736d..b419cbdd0 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 (); =20 if (!close_on_exec ()) fixup_after_fork (NULL); /* No parent handle required. */