OSDN Git Service

* fhandler.h (fhandler_tty_slave): Declare new methods.
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / tty.cc
index 7989844..424cf71 100644 (file)
@@ -325,13 +325,13 @@ tty::init (void)
 }
 
 HANDLE
-tty::get_event (const char *fmt, BOOL inherit)
+tty::get_event (const char *fmt, BOOL inherit, BOOL manual_reset)
 {
   HANDLE hev;
   char buf[40];
 
   __small_sprintf (buf, fmt, ntty);
-  if (!(hev = CreateEvent (inherit ? &sec_all : &sec_all_nih, FALSE, FALSE, buf)))
+  if (!(hev = CreateEvent (inherit ? &sec_all : &sec_all_nih, manual_reset, FALSE, buf)))
     {
       termios_printf ("couldn't create %s", buf);
       set_errno (ENOENT);      /* FIXME this can't be the right errno */
@@ -408,7 +408,7 @@ tty::common_init (fhandler_pty_master *ptym)
        return FALSE;
     }
 
-  if (!(ptym->input_available_event = get_event (INPUT_AVAILABLE_EVENT, FALSE)))
+  if (!(ptym->input_available_event = get_event (INPUT_AVAILABLE_EVENT, FALSE, TRUE)))
     return FALSE;
 
   char buf[40];