about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-03-05 17:15:44 +0000
committerMiles Bader <miles@gnu.org>1996-03-05 17:15:44 +0000
commit3cf11a4b3388982a0b4946953c1500a3c583074d (patch)
tree36d00f23f462e9156f1f1e2942c8d61eeda3d6f8 /sysdeps
parentd43e047895ff75254d50c5df8446e0e91453d890 (diff)
downloadglibc-3cf11a4b3388982a0b4946953c1500a3c583074d.tar.gz
glibc-3cf11a4b3388982a0b4946953c1500a3c583074d.tar.xz
glibc-3cf11a4b3388982a0b4946953c1500a3c583074d.zip
(__select): Don't fault when some fdmask is 0.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/select.c b/sysdeps/mach/hurd/select.c
index 001a28b541..d1702874cc 100644
--- a/sysdeps/mach/hurd/select.c
+++ b/sysdeps/mach/hurd/select.c
@@ -284,15 +284,15 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
 
       if (type & SELECT_READ)
 	got++;
-      else
+      else if (readfds)
 	FD_CLR (i, readfds);
       if (type & SELECT_WRITE)
 	got++;
-      else
+      else if (writefds)
 	FD_CLR (i, writefds);
       if (type & SELECT_URG)
 	got++;
-      else
+      else if (exceptfds)
 	FD_CLR (i, exceptfds);
     }