From 763f09b97de5916721906b967a833ad814f42688 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 4 Nov 2001 03:29:15 +0000 Subject: [PATCH] * select.cc (verify_console): New function. (verify_windows): Ditto. (fhandler_console::select_read): Really do need to verify that there is something to read. (fhandler_console::select_windows): Ditto. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/select.cc | 19 +++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index afb46cadd..507c58ce1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2001-11-03 Christopher Faylor + + * select.cc (verify_console): New function. + (verify_windows): Ditto. + (fhandler_console::select_read): Really do need to verify that there is + something to read. + (fhandler_console::select_windows): Ditto. + 2001-11-03 Christopher Faylor * fhandler.h (fhandler_base::ready_for_read): Remove unused argument. diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index f25baaefd..37fe2f189 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -659,6 +659,14 @@ peek_console (select_record *me, bool) return me->write_ready; } + +static int +verify_console (select_record *me, fd_set *rfds, fd_set *wfds, + fd_set *efds) +{ + return peek_console (me, true); +} + select_record * fhandler_console::select_read (select_record *s) @@ -667,7 +675,7 @@ fhandler_console::select_read (select_record *s) { s = new select_record; s->startup = no_startup; - s->verify = verify_ok; + s->verify = verify_console; set_cursor_maybe (); } @@ -1439,6 +1447,13 @@ peek_windows (select_record *me, bool) return me->write_ready; } +static int +verify_windows (select_record *me, fd_set *rfds, fd_set *wfds, + fd_set *efds) +{ + return peek_windows (me, true); +} + select_record * fhandler_windows::select_read (select_record *s) { @@ -1446,8 +1461,8 @@ fhandler_windows::select_read (select_record *s) { s = new select_record; s->startup = no_startup; - s->verify = verify_ok; } + s->verify = verify_windows; s->peek = peek_windows; s->read_selected = true; s->read_ready = false; -- 2.43.5