aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-12 21:24:15 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-12 21:46:31 +0900
commitd593c3e17ea1c614ddf37ff61e6d382d81a343d7 (patch)
treed2b787d1147c505a4cbeb4a5c7f2a4140e65f640 /winsup
parente91ea41ef1be3d3e52c451c7bd691e0c2b7de910 (diff)
downloadnewlib-d593c3e17ea1c614ddf37ff61e6d382d81a343d7.zip
newlib-d593c3e17ea1c614ddf37ff61e6d382d81a343d7.tar.gz
newlib-d593c3e17ea1c614ddf37ff61e6d382d81a343d7.tar.bz2
Cygwin: pty: Fix console mode of non-cygwin apps in background.
- If the non-cygwin app is started in the background in pseudo console, the console mode is broken for the app. This patch fixes the issue.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_tty.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 37e27f3..7b18a15 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -3384,7 +3384,7 @@ skip_create:
if (get_ttyp ()->previous_output_code_page)
SetConsoleOutputCP (get_ttyp ()->previous_output_code_page);
- do
+ if (get_ttyp ()->getpgid () == myself->pgid)
{
termios &t = get_ttyp ()->ti;
DWORD mode;
@@ -3409,7 +3409,6 @@ skip_create:
mode |= DISABLE_NEWLINE_AUTO_RETURN;
SetConsoleMode (hpConOut, mode);
}
- while (false);
return true;