This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Cygwin: console: Make console input work in GDB and strace.


- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]