Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 696 of file event.c.
Referenced by adns_synchronous(), main(), and proclog().
{ int r, maxfd, rsel; fd_set readfds, writefds, exceptfds; struct timeval tvbuf, *tvp; adns__consistency(ads,*query_io,cc_entex); for (;;) { r= adns__internal_check(ads,query_io,answer_r,context_r); if (r != EAGAIN) break; maxfd= 0; tvp= 0; FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds); adns_beforeselect(ads,&maxfd,&readfds,&writefds,&exceptfds,&tvp,&tvbuf,0); assert(tvp); ADNS_CLEAR_ERRNO; rsel= select(maxfd,&readfds,&writefds,&exceptfds,tvp); ADNS_CAPTURE_ERRNO; if (rsel==-1) { if (errno == EINTR) { if (ads->iflags & adns_if_eintr) { r= EINTR; break; } } else { adns__diag(ads,-1,0,"select failed in wait: %s",strerror(errno)); adns_globalsystemfailure(ads); } } else { assert(rsel >= 0); adns_afterselect(ads,maxfd,&readfds,&writefds,&exceptfds,0); } } adns__consistency(ads,0,cc_entex); return r; }