public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: Fix incorrect TTY for non-cygwin process.
@ 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=41864091014b63b0cb72ae98281fa53349b6ef77
commit 41864091014b63b0cb72ae98281fa53349b6ef77
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Fri Sep 20 12:04:36 2019 +0900
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.
Diff:
---
winsup/cygwin/exceptions.cc | 2 +-
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 848f9bd..db0fe08 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 4396ec9..4d8bcc9 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
^ 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: Fix incorrect TTY for non-cygwin process 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).