libev doesn't notify on read event (file FD and timers)

Assaf Inbal shmuelzon at
Fri Apr 25 14:34:09 CEST 2014

> I'll take care of it, but indeed, that's the code that generates the
> event.  It does rely on the undocumented behaviour of EPOLL returning
> eperm on regular files (but whats not undocumented in epoll...), but the
> problem is caused by your watchers using the same fd, and while libev
> removes the emulation for the fd on the first ev_io_stop, it doesn't add
> it back on the next ev_io_start, which is a bug in not clearing the epoll
> event mask (EV_EMASK_EPERM).

Just one more question, if the issue is because the mask isn't cleared
for the FD, why does it work without the timer in the sample code I
attached before, I still call ev_io_stop on the first FD, and then
ev_io_start on the next.

More information about the libev mailing list