* [PATCH] Cygwin: pty: Fix timing of creating invisible console.
@ 2022-05-08 11:04 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-05-08 11:04 UTC (permalink / raw)
To: cygwin-patches
- 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index bdde1dce6..9ab681d6c 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -2467,6 +2467,8 @@ fhandler_pty_slave::bg_check (int sig, bool dontsignal)
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", "");
@@ -2475,8 +2477,6 @@ fhandler_pty_slave::fixup_after_fork (HANDLE parent)
void
fhandler_pty_slave::fixup_after_exec ()
{
- create_invisible_console ();
-
if (!close_on_exec ())
fixup_after_fork (NULL); /* No parent handle required. */
--
2.36.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-08 11:04 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:04 [PATCH] 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).