Cygwin: console: Make console input work in GDB and strace.

- After commit 2232498c71, console
  input cause error in GDB or strace. This patch fixes this issue.
This commit is contained in:
Takashi Yano 2019-09-21 06:10:35 +09:00 committed by Ken Brown
parent 81c55654e6
commit aa529d00ea
1 changed files with 1 additions and 1 deletions

View File

@ -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);