*/
static int select_event_loop_select(struct select_event_context *select_ev, struct timeval *tvalp)
{
- fd_set r_fds, w_fds;
+ fd_set r_fds, w_fds, e_fds;
struct tevent_fd *fde;
int selrtn;
int select_errno;
FD_ZERO(&r_fds);
FD_ZERO(&w_fds);
+ FD_ZERO(&e_fds);
/* setup any fd events */
for (fde = select_ev->ev->fd_events; fde; fde = fde->next) {
if (fde->flags & TEVENT_FD_READ) {
FD_SET(fde->fd, &r_fds);
+ FD_SET(fde->fd, &e_fds);
}
if (fde->flags & TEVENT_FD_WRITE) {
FD_SET(fde->fd, &w_fds);
}
tevent_trace_point_callback(select_ev->ev, TEVENT_TRACE_BEFORE_WAIT);
- selrtn = select(select_ev->maxfd+1, &r_fds, &w_fds, NULL, tvalp);
+ selrtn = select(select_ev->maxfd+1, &r_fds, &w_fds, &e_fds, tvalp);
select_errno = errno;
tevent_trace_point_callback(select_ev->ev, TEVENT_TRACE_AFTER_WAIT);