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

Assaf Inbal shmuelzon at gmail.com
Fri Apr 25 09:16:38 CEST 2014


Hey Marc,

Thanks for the pointers.

Does it only fail with the epoll backend? (try running with LIBEV_FLAGS=2
> in your environment to test) - it could be a bug in the code that
> generates fake events for files.
>

​You're ​right, using select or poll works as expected and only epoll is
affected.

If, as I suspect from your program, you deliberately use watchers for file
> descriptors that are known files the fix or workaround is easy though:
> just do your I/O directly, that's faster and simpler.
>

​The attached program was just a simple example to reproduce the issue. As
I explained in the first mail, I have a library which works directly over
FDs which (most of the time) are TCP sockets but occasionally are 'regular'
files.​

So, assuming that epoll is really the problem, I'm guessing I should look
somewhere in epoll_poll(), specifically near the "now synthesize events for
all fds where epoll fails" comment?
Since I have never dug into libev's code, are there any pointers you can
give me in the fake FD events area?

Thanks again,
Assaf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20140425/5db41e02/attachment.html>


More information about the libev mailing list