diff options
author | Archie Cobbs <archie@FreeBSD.org> | 2002-08-29 21:39:19 +0000 |
---|---|---|
committer | Archie Cobbs <archie@FreeBSD.org> | 2002-08-29 21:39:19 +0000 |
commit | afa46253071aa490469e908405b71887c252f9c4 (patch) | |
tree | aa7dcc9cb64d129e3a4c13a9f90f8e4f0054aaa0 | |
parent | 5bdfbf5afde33fe413fef0154e3a81cf39cf0828 (diff) |
Notes
-rw-r--r-- | lib/libc_r/uthread/uthread_select.c | 10 | ||||
-rw-r--r-- | lib/libkse/thread/thr_select.c | 10 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_select.c | 10 |
3 files changed, 18 insertions, 12 deletions
diff --git a/lib/libc_r/uthread/uthread_select.c b/lib/libc_r/uthread/uthread_select.c index a3a9a9d2d1382..2776cb2c80fcf 100644 --- a/lib/libc_r/uthread/uthread_select.c +++ b/lib/libc_r/uthread/uthread_select.c @@ -179,8 +179,9 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, got_events = 0; if (readfds != NULL) { if (FD_ISSET(data.fds[i].fd, readfds)) { - if (data.fds[i].revents & (POLLIN | - POLLRDNORM)) + if ((data.fds[i].revents & (POLLIN + | POLLRDNORM | POLLERR + | POLLHUP | POLLNVAL)) != 0) got_events++; else FD_CLR(data.fds[i].fd, readfds); @@ -188,8 +189,9 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, } if (writefds != NULL) { if (FD_ISSET(data.fds[i].fd, writefds)) { - if (data.fds[i].revents & (POLLOUT | - POLLWRNORM | POLLWRBAND)) + if ((data.fds[i].revents & (POLLOUT + | POLLWRNORM | POLLWRBAND | POLLERR + | POLLHUP | POLLNVAL)) != 0) got_events++; else FD_CLR(data.fds[i].fd, diff --git a/lib/libkse/thread/thr_select.c b/lib/libkse/thread/thr_select.c index a3a9a9d2d1382..2776cb2c80fcf 100644 --- a/lib/libkse/thread/thr_select.c +++ b/lib/libkse/thread/thr_select.c @@ -179,8 +179,9 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, got_events = 0; if (readfds != NULL) { if (FD_ISSET(data.fds[i].fd, readfds)) { - if (data.fds[i].revents & (POLLIN | - POLLRDNORM)) + if ((data.fds[i].revents & (POLLIN + | POLLRDNORM | POLLERR + | POLLHUP | POLLNVAL)) != 0) got_events++; else FD_CLR(data.fds[i].fd, readfds); @@ -188,8 +189,9 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, } if (writefds != NULL) { if (FD_ISSET(data.fds[i].fd, writefds)) { - if (data.fds[i].revents & (POLLOUT | - POLLWRNORM | POLLWRBAND)) + if ((data.fds[i].revents & (POLLOUT + | POLLWRNORM | POLLWRBAND | POLLERR + | POLLHUP | POLLNVAL)) != 0) got_events++; else FD_CLR(data.fds[i].fd, diff --git a/lib/libpthread/thread/thr_select.c b/lib/libpthread/thread/thr_select.c index a3a9a9d2d1382..2776cb2c80fcf 100644 --- a/lib/libpthread/thread/thr_select.c +++ b/lib/libpthread/thread/thr_select.c @@ -179,8 +179,9 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, got_events = 0; if (readfds != NULL) { if (FD_ISSET(data.fds[i].fd, readfds)) { - if (data.fds[i].revents & (POLLIN | - POLLRDNORM)) + if ((data.fds[i].revents & (POLLIN + | POLLRDNORM | POLLERR + | POLLHUP | POLLNVAL)) != 0) got_events++; else FD_CLR(data.fds[i].fd, readfds); @@ -188,8 +189,9 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, } if (writefds != NULL) { if (FD_ISSET(data.fds[i].fd, writefds)) { - if (data.fds[i].revents & (POLLOUT | - POLLWRNORM | POLLWRBAND)) + if ((data.fds[i].revents & (POLLOUT + | POLLWRNORM | POLLWRBAND | POLLERR + | POLLHUP | POLLNVAL)) != 0) got_events++; else FD_CLR(data.fds[i].fd, |