diff options
author | Christopher Faylor <me@cgf.cx> | 2001-11-04 03:29:15 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-11-04 03:29:15 +0000 |
commit | 763f09b97de5916721906b967a833ad814f42688 (patch) | |
tree | 2e2b9690acf6974f3508f903374dc88b0db1e4b2 | |
parent | 476dfb657b1b66c1c98484f047749e4be1a5b14d (diff) | |
download | newlib-763f09b97de5916721906b967a833ad814f42688.zip newlib-763f09b97de5916721906b967a833ad814f42688.tar.gz newlib-763f09b97de5916721906b967a833ad814f42688.tar.bz2 |
* 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.
-rw-r--r-- | winsup/cygwin/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 19 |
2 files changed, 25 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index afb46ca..507c58c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,13 @@ 2001-11-03 Christopher Faylor <cgf@redhat.com> + * 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 <cgf@redhat.com> + * fhandler.h (fhandler_base::ready_for_read): Remove unused argument. (fhandler_tty_slave::ready_for_read): Ditto. (select_record): Remove poll, initialize peek. diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index f25baae..37fe2f1 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; |