OSDN Git Service

* fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console whenever a pty
authorcgf <cgf>
Sat, 19 Apr 2003 02:04:55 +0000 (02:04 +0000)
committercgf <cgf>
Sat, 19 Apr 2003 02:04:55 +0000 (02:04 +0000)
is allocated.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_tty.cc

index f804da3..d1c9abe 100644 (file)
@@ -1,5 +1,10 @@
 2003-04-18  Christopher Faylor  <cgf@redhat.com>
 
+       * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
+       whenever a pty is allocated.
+
+2003-04-18  Christopher Faylor  <cgf@redhat.com>
+
        * Makefile.in: Use ${nostdlib} variable.
 
 2003-04-18  Diego Biurrun  <diego@biurrun.de>
index 2361643..0014710 100644 (file)
@@ -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);