I would have just converted the while to: if (evGetNext(ev, &event, EV_POLL) != -1) INSIST_ERR(evDispatch(ev, event) != -1); else INSIST_ERR(errno == EINTR || errno == EWOULDBLOCK); Mark -- Mark Andrews, Nominum Inc. 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: Mark.Andrews at nominum.com