aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2023-03-05 19:02:13 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2023-03-07 10:51:29 +0900
commit13a84ac79b1c8e7e6aa3c7a2444ae2cbbe5ee430 (patch)
treeec37d19fc79381d6ea5af6b4aed522a02b148c68 /winsup/cygwin/spawn.cc
parentce979464f3b83422469ae2c0bf1d32f5160812b4 (diff)
downloadnewlib-13a84ac79b1c8e7e6aa3c7a2444ae2cbbe5ee430.zip
newlib-13a84ac79b1c8e7e6aa3c7a2444ae2cbbe5ee430.tar.gz
newlib-13a84ac79b1c8e7e6aa3c7a2444ae2cbbe5ee430.tar.bz2
Cygwin: ctty: Replace ctty constant with more descriptive macros.
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 <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 32ba5b3..4d0ca12 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -623,7 +623,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);
+ init_console_handler (CTTY_IS_VALID (myself->ctty));
loop:
/* When ruid != euid we create the new process under the current original