diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2019-09-20 06:04:36 +0300 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2019-09-21 00:48:37 +0300 |
commit | 41864091014b63b0cb72ae98281fa53349b6ef77 (patch) | |
tree | b71aff62d09706aa00063f145ea0feb77cc55416 /winsup | |
parent | aa529d00ea98a2c4f77460df1a4c6a9f97e842cb (diff) |
Cygwin: Fix incorrect TTY for non-cygwin process.
- After commit d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b, the TTY
displayed by ps command is incorrect if the process is non-cygwin
process. This patch fixes this issue.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 848f9bd68..db0fe0867 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -949,7 +949,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga) if (incyg) set_signal_arrived (); - if (!have_execed) + if (!have_execed && ch_spawn.iscygwin ()) proc_subproc (PROC_CLEARWAIT, 1); sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, si.si_signo); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 4396ec9e5..4d8bcc9fa 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -622,10 +622,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, si.cb = sizeof (si); if (!iscygwin ()) - { - init_console_handler (myself->ctty > 0); - myself->ctty = 0; - } + init_console_handler (myself->ctty > 0); loop: /* When ruid != euid we create the new process under the current original |