This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH] Cygwin: console: Make console input work in GDB and strace.
- From: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- To: cygwin-patches at cygwin dot com
- Cc: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- Date: Wed, 18 Sep 2019 23:30:06 +0900
- Subject: [PATCH] Cygwin: console: Make console input work in GDB and strace.
- Dkim-filter: OpenDKIM Filter v2.10.3 conuserg-03.nifty.com x8IEU5eK021709
- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console
input cause error in GDB or strace. This patch fixes this issue.
---
winsup/cygwin/fhandler_termios.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 5b0ba5603..282f0fbf4 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -202,7 +202,8 @@ fhandler_termios::bg_check (int sig, bool dontsignal)
*/
if (!myself->pgid || !tc () || tc ()->getpgid () == myself->pgid ||
myself->ctty != tc ()->ntty ||
- ((sig == SIGTTOU) && !(tc ()->ti.c_lflag & TOSTOP)))
+ ((sig == SIGTTOU) && !(tc ()->ti.c_lflag & TOSTOP)) ||
+ being_debugged ())
return bg_ok;
/* sig -SIGTTOU is used to indicate a change to terminal settings, where
--
2.21.0