public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: console: Make console input work in GDB and strace.
@ 2019-09-20 21:59 Ken Brown
  0 siblings, 0 replies; only message in thread
From: Ken Brown @ 2019-09-20 21:59 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=aa529d00ea98a2c4f77460df1a4c6a9f97e842cb

commit aa529d00ea98a2c4f77460df1a4c6a9f97e842cb
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Sat Sep 21 06:10:35 2019 +0900

    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.

Diff:
---
 winsup/cygwin/pinfo.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index ffd4c8c..35c1ffe 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-20 21:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 21:59 [newlib-cygwin] Cygwin: console: Make console input work in GDB and strace Ken Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).