On Tue, 7 Mar 2023 02:42:49 +
"Lavrentiev, Anton (NIH/NLM/NCBI) [C]" wrote:
> Can't help but notice that these two lines are not exactly logically
> equivalent:
> format_process_ctty (void *data, char *&destbuf)
> {
>_pinfo *p = (_pinfo *) data;
> - if (p->ctty < 0)
> + if (!CTTY_IS_V
Remove old 'kludge' code which does not seem necessary anymore. The
comment of the 'kludge' is as follows.
* syscalls.cc (setsid): On second thought, in the spirit of keeping
things kludgy, set ctty to -2 here as a special flag, and...
(open): ...only eschew setting O_NOCTTY when that ca
This patch replaces ctty constants with more descriptive macros
(CTTY_UNINITIALIZED and CTTY_RELEASED) rather than -1 and -2 as
well as checking sign with CTTY_IS_VALID().
Fixes: 3b7df69aaa57 (Cygwin: ctty: Add comments for the special values: -1 and
-2.)
Suggested-by: Corinna Vinschen
Signed-of
Signed-off-by: Takashi Yano
---
winsup/cygwin/fhandler/console.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler/console.cc
b/winsup/cygwin/fhandler/console.cc
index 4a4cf1897..d4b09dc79 100644
--- a/winsup/cygwin/fhandler/console.cc
+++ b/winsup/cygwi
Previously, fixup_after_{exec,fork}() calls for CTTY were missing.
This patch fixes that.
Signed-off-by: Takashi Yano
---
winsup/cygwin/dtable.cc | 5 +
winsup/cygwin/fhandler/console.cc | 7 +++
2 files changed, 12 insertions(+)
diff --git a/winsup/cygwin/dtable.cc b/winsup/c