[newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Not to change code page of parent console.

Takashi Yano tyan0@sourceware.org
Mon May 9 03:53:48 GMT 2022


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

commit fbe34bd7642638c2cc11acc41ca2b43f1c56ce16
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Mon May 9 12:23:57 2022 +0900

    Cygwin: pty: Not to change code page of parent console.
    
    - The recent commit "Cygwin: pty: Fix timing of creating invisible
      console." breaks the feature added by commit 72770148, which
      prevents pty from changing code page of parent console. This patch
      restores that.

Diff:
---
 winsup/cygwin/fhandler_console.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index d2ed15a99..e84823685 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1608,7 +1608,7 @@ fhandler_console::close ()
   if (con_ra.rabuf)
     free (con_ra.rabuf);
 
-  if (!have_execed)
+  if (!have_execed && !invisible_console)
     free_console ();
   return 0;
 }


More information about the Cygwin-cvs mailing list