public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Fix timing of creating invisible console.
@ 2022-05-08 11:07 Takashi Yano
  0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-05-08 11:07 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3c4ed01b18ef858de0bd1baaaa583c370ee00c12

commit 3c4ed01b18ef858de0bd1baaaa583c370ee00c12
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Sun May 8 18:16:17 2022 +0900

    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.

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 ();
 
   if (!close_on_exec ())
     fixup_after_fork (NULL);	/* No parent handle required. */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-08 11:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-08 11:07 [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Fix timing of creating invisible console Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).