- rv=i->before(i->state, fds+idx, &nfds, &timeout);
- if (rv!=0) {
- if (rv!=ERANGE)
- fatal("run: beforepoll_fn (%s) returns %d",i->desc,rv);
- assert(nfds < INT_MAX/4 - shortfall);
- shortfall += nfds-remain;
+ if (interest_isregistered(i)) {
+ rv=i->before(i->state, fds+idx, &nfds, &timeout);
+ if (rv!=0) {
+ if (rv!=ERANGE)
+ fatal("run: beforepoll_fn (%s) returns %d",i->desc,rv);
+ assert(nfds < INT_MAX/4 - shortfall);
+ shortfall += nfds-remain;
+ nfds=0;
+ timeout=0;
+ }
+ } else {