diff options
author | root <root> | 2007-11-12 00:50:41 +0000 |
---|---|---|
committer | root <root> | 2007-11-12 00:50:41 +0000 |
commit | 1c98724c8fe77a60fa8f7fe4aca6197a7efad110 (patch) | |
tree | 52864c3a674af1b5d813df54a390f62705436103 | |
parent | f80233888429b82d548aed2fca59cd324e1b6610 (diff) |
handle pollnval
-rw-r--r-- | ev_poll.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -94,12 +94,15 @@ poll_poll (EV_P_ ev_tstamp timeout) } for (i = 0; i < pollcnt; ++i) - fd_event ( - EV_A_ - polls [i].fd, - (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) - | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) - ); + if (polls [i].revents & POLLNVAL) + fd_kill (EV_A_ polls [i].fd); + else + fd_event ( + EV_A_ + polls [i].fd, + (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) + | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) + ); } static int |