Event-polling after a fork

Marc Lehmann schmorp at schmorp.de
Fri Feb 28 22:27:18 CET 2020

On Fri, Feb 28, 2020 at 02:10:15PM -0500, Felipe Gasper <felipe at felipegasper.com> wrote:
> If I take your meaning, you’re saying that, for example, epoll would break because after a fork the two processes share the same epoll. That seems solvable enough in a backend that’s aware it uses epoll rather than select/poll: just make that implementation of reset() close the epoll rather than removing individual watchers from the epoll.

I forgot to mention - AnyEvent does not use epoll, so it doesn't have this
problem. Any such solution must be implemented at the event loop level.

What I am pointing out is that this doesn't solve the problem you
described - I think you need to sit down and try to understand your
*problem* first, and then read through my mails, trying to understand
the issues. Ihope my last mail clarified them further, and if you have
questions, don't feel afraid to ask.

As long as you think that something like reset makes fork somehow work,
you haven't even begun to understand the problem.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

More information about the anyevent mailing list