diff options
author | Takashi Yano via Cygwin-patches <cygwin-patches@cygwin.com> | 2021-03-08 22:14:58 +0900 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-03-08 15:02:25 +0100 |
commit | 850b5a9aae49a9a0fa21d3ace385e8d6b03ae285 (patch) | |
tree | d0b62d15dce0b4f8c4e177abd8dca484bb1edf82 | |
parent | 07e2ce9f55eb2464371816334b603b741f81e22a (diff) | |
download | cygnal-850b5a9aae49a9a0fa21d3ace385e8d6b03ae285.tar.gz cygnal-850b5a9aae49a9a0fa21d3ace385e8d6b03ae285.tar.bz2 cygnal-850b5a9aae49a9a0fa21d3ace385e8d6b03ae285.zip |
Cygwin: pty: Attach to stub process when non-cygwin app inherits pcon.
- If two non-cygwin apps are started simultaneously, attaching to
pseudo console sometimes fails. This is because the second app
trys to attach to the process not started yet. This patch avoids
the issue by attaching to the stub process rather than the other
non-cygwin app.
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 4358bceec..3bfc8c0c8 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3104,7 +3104,7 @@ fhandler_pty_slave::setup_pseudoconsole (bool nopcon) 0, TRUE, DUPLICATE_SAME_ACCESS); CloseHandle (pcon_owner); FreeConsole (); - AttachConsole (p->dwProcessId); + AttachConsole (p->exec_dwProcessId); goto skip_create; } |