summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdselect.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index bb942429dd..95dfde059b 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -548,7 +548,15 @@ _hurd_select (int nfds,
readiness of the erring object and the next call hopefully
will get the error again. */
if (type & SELECT_ERROR)
- type = SELECT_ALL;
+ {
+ type = 0;
+ if (readfds != NULL && FD_ISSET (i, readfds))
+ type |= SELECT_READ;
+ if (writefds != NULL && FD_ISSET (i, writefds))
+ type |= SELECT_WRITE;
+ if (exceptfds != NULL && FD_ISSET (i, exceptfds))
+ type |= SELECT_URG;
+ }
if (type & SELECT_READ)
ready++;