joyent/libuv — pull request #970 by indutny (2013-10-25 21:13:55+00:00)
Title: unix: update events from pevents between polls

Watchers could be stopped between two `kevent()`/`epoll_wait()` calls
(which may happen in the same loop in `uv__io_poll()`), in such cases
`watcher->events` could be stale and won't be updated to
`watcher->pevents`.

Additionally, since epoll has only one entry per fd, whole update loop
should be invoked to keep events up-to-date.

/cc @bnoordhuis