Fix a tight spin on epoll (or /dev/poll) that occurs when the EPOLLERR and EPOLLHUP events are reported for a descriptor and there are no pending operations.