[PATCH v2 0/1] Cygwin: console: Make console input work in GDB and strace.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH v2 0/1] Cygwin: console: Make console input work in GDB and strace.

Takashi Yano
- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console
  input cause error in GDB or strace. This patch fixes this issue.

v2:
Patch pinfo.cc rather than fhandler_termios.cc. This probably is
the right thing.

Takashi Yano (1):
  Cygwin: console: Make console input work in GDB and strace.

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

--
2.21.0

Reply | Threaded
Open this post in threaded view
|

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

Takashi Yano
- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console
  input cause error in GDB or strace. This patch fixes this issue.
---
 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 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);
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH v2 0/1] Cygwin: console: Make console input work in GDB and strace.

Ken Brown-6
In reply to this post by Takashi Yano
On 9/20/2019 5:10 PM, Takashi Yano wrote:

> - After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console
>    input cause error in GDB or strace. This patch fixes this issue.
>
> v2:
> Patch pinfo.cc rather than fhandler_termios.cc. This probably is
> the right thing.
>
> Takashi Yano (1):
>    Cygwin: console: Make console input work in GDB and strace.
>
>   winsup/cygwin/pinfo.cc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Pushed.  Thanks.

Ken