diff options
author | Roland McGrath <roland@gnu.org> | 2001-10-28 22:10:26 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-10-28 22:10:26 +0000 |
commit | 80081a0a88d4a3e8277fef04816da32e861c8f40 (patch) | |
tree | abbcc6c77413609b66ebca5371077acece18c036 /hurd/hurdselect.c | |
parent | 95eaff64c7276cce271e368f097dea0c40ccb8b5 (diff) | |
download | glibc-80081a0a88d4a3e8277fef04816da32e861c8f40.tar glibc-80081a0a88d4a3e8277fef04816da32e861c8f40.tar.gz glibc-80081a0a88d4a3e8277fef04816da32e861c8f40.tar.bz2 glibc-80081a0a88d4a3e8277fef04816da32e861c8f40.zip |
2001-10-28 Roland McGrath <roland@frob.com>
* hurd/hurdselect.c (_hurd_select): Check SELECT_RETURNED bit when
packing results for a `poll' call.
Diffstat (limited to 'hurd/hurdselect.c')
-rw-r--r-- | hurd/hurdselect.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index bcc2594bf0..c3dfb52119 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -1,5 +1,6 @@ /* Guts of both `select' and `poll' for Hurd. - Copyright (C) 1991,92,93,94,95,96,97,98, 99 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,94,95,96,97,98,99,2001 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -395,15 +396,18 @@ _hurd_select (int nfds, /* Fill in the `revents' members of the user's array. */ for (i = 0; i < nfds; ++i) { - const int type = d[i].type; + int type = d[i].type; int_fast16_t revents = 0; - if (type & SELECT_READ) - revents |= POLLIN; - if (type & SELECT_WRITE) - revents |= POLLOUT; - if (type & SELECT_URG) - revents |= POLLPRI; + if (type & SELECT_RETURNED) + { + if (type & SELECT_READ) + revents |= POLLIN; + if (type & SELECT_WRITE) + revents |= POLLOUT; + if (type & SELECT_URG) + revents |= POLLPRI; + } pollfds[i].revents = revents; } |