aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
authorTakashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>2021-01-28 12:26:13 +0900
committerCorinna Vinschen <corinna@vinschen.de>2021-01-28 11:21:12 +0100
commit8aeb3f3e50373ecc300a32caab1e91980aabb40b (patch)
treea9e85e56aee74119db89f33381d75bfc624469d6 /winsup/cygwin/spawn.cc
parent442093214dd6b911a3a0080a10904587733a581f (diff)
downloadnewlib-8aeb3f3e50373ecc300a32caab1e91980aabb40b.zip
newlib-8aeb3f3e50373ecc300a32caab1e91980aabb40b.tar.gz
newlib-8aeb3f3e50373ecc300a32caab1e91980aabb40b.tar.bz2
Cygwin: pty: Make apps using console APIs be able to debug with gdb.
- After commit bb428520, there has been the disadvantage: 2) The apps which use console API cannot be debugged with gdb. This is because pseudo console is not activated since gdb uses CreateProcess() rather than exec(). Even with this limitation, attaching gdb to native app, in which pseudo console is already activated, works. This patch clears this disadvantage.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index b80a20f..383a5a0 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -964,6 +964,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
WaitForSingleObject (pi.hProcess, INFINITE);
if (ptys_ttyp)
{
+ ptys_ttyp->wait_pcon_fwd ();
fhandler_pty_slave::transfer_input (fhandler_pty_slave::to_cyg,
ptys_from_master,
ptys_ttyp, ptys_unit,
@@ -990,6 +991,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
res = -1;
if (ptys_ttyp)
{
+ ptys_ttyp->wait_pcon_fwd ();
fhandler_pty_slave::transfer_input (fhandler_pty_slave::to_cyg,
ptys_from_master,
ptys_ttyp, ptys_unit,