Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-04-19 06:04:55 +0400
committerChristopher Faylor <me@cgf.cx>2003-04-19 06:04:55 +0400
commitafa18d8a69f469b0bf2cd1da79d1ae93382129e5 (patch)
tree9b2971aac224cceb5b26678bb66763e5989fb35d /winsup/cygwin/fhandler_tty.cc
parent4e0d877875e441eab6b58903fbc982f6961e3aa9 (diff)
* fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console whenever a pty
is allocated.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 2361643d9..00147103a 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -554,7 +554,11 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t)
set_open_status ();
if (!output_done_event)
{
- fhandler_console::open_fhs++;
+ if (fhandler_console::open_fhs++ == 0)
+ {
+ BOOL b = AllocConsole ();
+ termios_printf ("%d = AllocConsole ()", b);
+ }
termios_printf ("incremented open_fhs %d", fhandler_console::open_fhs);
}
termios_printf ("tty%d opened", ttynum);