On Sun, Nov 3, 2013 at 11:46 AM, Fedor Indutny <notifications@github.com> wrote:
>
> In src/unix/darwin.c:
>
> > +  struct kevent* events;
> > +  intptr_t i;
> > +  intptr_t nfds;
> > +
> > +  /* No watchers - no fake watcher */
> > +  if (loop->watchers == NULL)
> > +    return;
> > +
> > +  events = (struct kevent*) loop->watchers[loop->nwatchers];
> > +  nfds = (intptr_t) loop->watchers[loop->nwatchers + 1];
> > +  if (events == NULL)
> > +    return;
> > +
> > +  /* Invalidate events with same file descriptor */
> > +  for (i = 0; i < nfds; i++)
> > +    if ((int) events[i].ident == fd)
>
> erm... we are doing the same thing in kqueue.c.

That's something we should fix then.