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

Marc Lehmann schmorp at
Fri Apr 25 15:08:08 CEST 2014

CVS now contains a tentative fix, you can get it via:

   cvs -z3 -d :pserver:anonymous at co libev

On Fri, Apr 25, 2014 at 03:34:09PM +0300, Assaf Inbal <shmuelzon at> wrote:
> 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.

The fds are removed only when polling for new events, so when you
immediately register the same fd again, it will still be in the list, so
things work.

If you wait a bit, by using a timer, then the backend will remove the fd
from the list without clearing the flag, so when you then register the fd
again, the backend thinks its still in the list (flag set) and doesn't
re-add it.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list