libev-3.48 has just been released

Marc Lehmann schmorp at
Thu Oct 30 17:15:49 CET 2008

On Thu, Oct 30, 2008 at 03:54:41PM +0300, Kandalintsev Alexandre <exe at> wrote:
> Do you have any tests showing this problem?

No, but you don't need any tests, the basic problem is that epoll doesn't
know about fork, so when a process forks, a) the parent will receive
events for file descriptors of the child and b) the parent can do nothing
about it, as it cannot remove the fds from its set. This property is by
design and well known. It's a feature, basically.

The only way to cope with a fork is to rebuild the epoll set when you want to
use it, e.g. the epoll set becomes unusable on fork, even in the parent
process. The problem with that, is, of course, that unix programs
and libraries rightfully expect to be able to fork without many ill side
effects to the parent process, and epoll breaks this.

> I want to try to wakeup kernel developers.

The kernel developers (especially davide) are well aware of these problems
and think they are a great feature and everybody has to rewrite his and her
software completely so it can only work with epoll and nothing else. Of
course, everybody also has to catch each and every fork etc. etc.

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

More information about the libev mailing list