From 5e8e21d938b5410b008f20d50d8d0fb9ba6df66b Mon Sep 17 00:00:00 2001 From: Egor Duda Date: Sun, 18 Mar 2001 18:05:01 +0000 Subject: * fhandler.h (fhandler_tty_slave): Declare new methods. * select.cc (fhandler_tty_slave::select_read): New method. * select.cc (fhandler_tty_slave::ready_for_read): Ditto. * select.cc (verify_tty_slave): New function. * fhandler_termios.cc (fhandler_termios::line_edit): Empty input buffer on signal. * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data after reading from pipe. Reset event if input pipe is empty. * tty.h (class tty): Allow creating events with manual reset. * tty.cc (tty::get_event): Use manual_reset flag. * tty.cc (tty::common_init): Create input_available_event with manual reset. --- winsup/cygwin/tty.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/tty.cc') diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 798984418..424cf7112 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -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]; -- cgit v1.2.3