aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/select.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-11-04 03:29:15 +0000
committerChristopher Faylor <me@cgf.cx>2001-11-04 03:29:15 +0000
commit763f09b97de5916721906b967a833ad814f42688 (patch)
tree2e2b9690acf6974f3508f903374dc88b0db1e4b2 /winsup/cygwin/select.cc
parent476dfb657b1b66c1c98484f047749e4be1a5b14d (diff)
downloadnewlib-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.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc19
1 files changed, 17 insertions, 2 deletions
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;