Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-12 15:24:15 +0300
committerTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-12 15:46:31 +0300
commitd593c3e17ea1c614ddf37ff61e6d382d81a343d7 (patch)
treed2b787d1147c505a4cbeb4a5c7f2a4140e65f640 /winsup
parente91ea41ef1be3d3e52c451c7bd691e0c2b7de910 (diff)
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 37e27f34a..7b18a15e7 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;