rem: if (FD_ISSET(handler->fd, &eset))
add: if ((handler->mask & WIExceptMask) && FD_ISSET(handler->fd, &eset))
context: handleInputEvents(Bool waitForInput){#if defined(HAVE_POLL) && defined(HAVE_POLL_H) && !defined(HAVE_SELECT)    struct pollfd *fds;    InputHandler *handler;    int count, timeout, nfds, k;    if (!inputHandler) {        W_FlushASAPNotificationQueue();        return False;    }    for (nfds = 0, handler = inputHandler;         handler != 0; handler = handler->next) nfds++;    fds = wmalloc(nfds * sizeof(struct pollfd));    for (k = 0, handler = inputHandler;         handler;         handler = handler->next, k++) {        fds[k].fd = handler->fd;        fds[k].events = 0;	if (handler->mask & WIReadMask)            fds[k].events |= POLLIN;	if (handler->mask & WIWriteMask)            fds[k].events |= POLLOUT;#if 0 /* FIXME */	if (handler->mask & WIExceptMask)	    FD_SET(handler->fd, &eset);#endif    }    /*     * If we don't wait for input, set timeout to return immediately,     * else setup the timeout to the estimated time until the     * next timer expires or if no timer is pending to infinite.     */    if (!waitForInput) {        timeout = 0;    } else if (timerPending()) {        struct timeval tv;	delayUntilNextTimerEvent(&tv);        timeout = tv.tv_sec * 1000 + tv.tv_usec / 1000;    } else {        timeout = -1;    }    count = poll(fds, nfds, timeout);    if (count > 0) {	handler = inputHandler;        k = 0;	while (handler) {	    int mask;            InputHandler *next;	    mask = 0;	    if (fds[k].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))		mask |= WIReadMask;	    if (fds[k].revents & (POLLOUT | POLLWRBAND))		mask |= WIWriteMask;	    if (fds[k].revents & (POLLHUP | POLLNVAL | POLLERR))		mask |= WIExceptMask;            next = handler->next;	    if (mask!=0 && handler->callback) {		(*handler->callback)(handler->fd, mask,				     handler->clientData);	    }	    handler = next;            k++;	}    }    wfree(fds);    W_FlushASAPNotificationQueue();    return (count > 0);#else /* not HAVE_POLL */#ifdef HAVE_SELECT    struct timeval timeout;    struct timeval *timeoutPtr;    fd_set rset, wset, eset;    int maxfd;    int count;    InputHandler *handler = inputHandler;    if (!inputHandler) {        W_FlushASAPNotificationQueue();        return False;    }    FD_ZERO(&rset);    FD_ZERO(&wset);    FD_ZERO(&eset);    maxfd = 0;    while (handler) {	if (handler->mask & WIReadMask)	    FD_SET(handler->fd, &rset);	if (handler->mask & WIWriteMask)	    FD_SET(handler->fd, &wset);	if (handler->mask & WIExceptMask)	    FD_SET(handler->fd, &eset);	if (maxfd < handler->fd)	    maxfd = handler->fd;	handler = handler->next;    }    /*     * If we don't wait for input, set timeout to return immediately,     * else setup the timeout to the estimated time until the     * next timer expires or if no timer is pending to infinite.     */    if (!waitForInput) {        timeout.tv_sec = 0;        timeout.tv_usec = 0;        timeoutPtr = &timeout;    } else if (timerPending()) {	delayUntilNextTimerEvent(&timeout);	timeoutPtr = &timeout;    } else {	timeoutPtr = (struct timeval*)0;    }    count = select(1 + maxfd, &rset, &wset, &eset, timeoutPtr);    if (count > 0) {	handler = inputHandler;	while (handler) {	    int mask;            InputHandler *next;	    mask = 0;	    if (FD_ISSET(handler->fd, &rset))		mask |= WIReadMask;	    if (FD_ISSET(handler->fd, &wset))		mask |= WIWriteMask;	    if (FD_ISSET(handler->fd, &eset))		mask |= WIExceptMask;            next = handler->next;	    if (mask!=0 && handler->callback) {		(*handler->callback)(handler->fd, mask,				     handler->clientData);	    }	    handler = next;	}    }    W_FlushASAPNotificationQueue();    return (count > 0);#else /* not HAVE_SELECT, not HAVE_POLL */Neither select nor poll. You lose.#endif /* HAVE_SELECT */#endif /* HAVE_POLL */}