if (idx < 0) /* need to allocate a new pollfd */
{
pollidxs [fd] = idx = pollcnt++;
- array_needsize (struct pollfd, polls, pollmax, pollcnt, );
+ array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2);
polls [idx].fd = fd;
}
}
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