[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] how to handle SIGCHLD before going into dispatch



Hi Dave,

On Fri, Aug 10, 2012 at 11:12 PM, Dave Hart <davehart@xxxxxxxxx> wrote:
> Your code has a race between the child and the parent.  If you create
> the base and install the SIGCHLD handling before forking, the race
> will be cured.

Thanks! That worked, I thought it was better to create the base in the
parent as only the parent needs it.

I assume I do not need to call event_reinit (as I see in the test
case) in the parent? I added that and it hung the parent process.

Cheers,
Phuah Yee Keat
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.