Bug with signal delivery after fork.

Marc Lehmann schmorp at schmorp.de
Tue Jan 15 05:06:27 CET 2008


On Mon, Jan 14, 2008 at 10:56:54AM -0500, Chris Shoemaker <c.shoemaker at cox.net> wrote:
>     I believe the attached program demonstrates some bug related to signal
> delivery after a fork.

Oh, what you see is that ev_default_fork only sets a flag for the next run
of ev_loop. You will have to run ev_loop to reinitialise the kernel state
after a fork (e.g. ev_loop (EVLOOP_NONBLOCK) will do).

The documentation will point this out in the next release (and it will
contain other things required by kqueue, which makes it less flexible).

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



More information about the libev mailing list