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
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2019-09-21 00:10:35 +0300
committerKen Brown <kbrown@cornell.edu>2019-09-21 00:48:37 +0300
commitaa529d00ea98a2c4f77460df1a4c6a9f97e842cb (patch)
tree585b3b2828909187084f8ea94c5e69560057b7e1
parent81c55654e63e512f89e219ebf929a8fdb3e72a95 (diff)
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.
-rw-r--r--winsup/cygwin/pinfo.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index ffd4c8cd9..35c1ffe25 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -570,7 +570,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
tc.setsid (sid);
sid = tc.getsid ();
/* See above */
- if (!tc.getpgid () && pgid == pid)
+ if ((!tc.getpgid () || being_debugged ()) && pgid == pid)
tc.setpgid (pgid);
}
debug_printf ("cygheap->ctty now %p, archetype %p", cygheap->ctty, fh ? fh->archetype : NULL);