aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-12 05:17:12 +0000
committerChristopher Faylor <me@cgf.cx>2006-01-12 05:17:12 +0000
commit9287bcd5348460c4dc49514eb08bc819b6d97771 (patch)
tree2dea4dfdd9d3ec9084d7d605e890aed2a864d4a6
parent750874d33de8778a469cc8c19ad6e4a509078f9b (diff)
downloadnewlib-9287bcd5348460c4dc49514eb08bc819b6d97771.zip
newlib-9287bcd5348460c4dc49514eb08bc819b6d97771.tar.gz
newlib-9287bcd5348460c4dc49514eb08bc819b6d97771.tar.bz2
* fhandler_console.cc (set_console_state_for_spawn): Fix to recognize ttys >=
0.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_console.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 18486f8..7f17cfe 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2006-01-12 Christopher Faylor <cgf@timesys.com>
+ * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
+ ttys >= 0.
+
+2006-01-12 Christopher Faylor <cgf@timesys.com>
+
* fhandler.h (set_console_state_for_spawn): Whackamole the argument
back to a bool.
* spawn.cc (spawn_guts): Ditto, i.e., once again call
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 5ca26d2..e3af924 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -147,7 +147,7 @@ void __stdcall
set_console_state_for_spawn (bool iscyg)
{
if (fhandler_console::need_invisible () || iscyg
- || (myself->ctty > 0 && myself->ctty != TTY_CONSOLE))
+ || (myself->ctty >= 0 && myself->ctty != TTY_CONSOLE))
return;
HANDLE h = CreateFile ("CONIN$", GENERIC_READ, FILE_SHARE_WRITE,