Fork watcher will not be called if fork() is invoked in prepare watcher callback.

Marc Lehmann schmorp at schmorp.de
Fri May 2 09:05:08 CEST 2014


On Thu, May 01, 2014 at 04:33:40PM +0800, 李晓岚 <LeeXiaolan+libev at gmail.com> wrote:
> Is this behavior is intended with any considerations or a bug?

We discussed this behaviour, but we couldn't come up with a reason on why one
would need to fork in a prepare watcher that couldn't be better served by
starting an ev_idle watcher.

Therefore, we decided to forbid invocations of ev_loop_fork from prepare
watchers.

If you have a convincing use case that couldn't be served by starting an
ev_idle watcher and forking from there, we'd be interested in hearing
about it :)

-- 
                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 libev mailing list