Re: Compatibility with other libraries using epoll

2012-05-10 Thread Chris Brody
Stephen, if you still cannot find the problem I suggest you make a simple test program, that can demonstrate the problem, and post it for others to help find the problem. This may help other people in the future. On Wed, May 9, 2012 at 7:11 PM, Stephen D. Bowline wrote: > Marc, thank you for taki

libev SIGCHLD handler

2012-05-10 Thread Vetoshkin Nikita
Hi! Not sure if this issue was on the list, google suggests nothing. If I'm not mistaken, upon receiving SIGHCLD libev calls waitpid(-1, ...) only once, which is wrong because multiple SIGCHLDs can be merged into one if many child processes died while we were in sighandler code. So correct SIGCHLD

Re: libev SIGCHLD handler

2012-05-10 Thread Marc Lehmann
On Thu, May 10, 2012 at 03:28:31PM +0400, Vetoshkin Nikita wrote: > Not sure if this issue was on the list, google suggests nothing. > If I'm not mistaken, upon receiving SIGHCLD libev calls waitpid(-1, > ...) only once, which is wrong because multiple SIGCHLDs can be merged > into one if many ch

Re: libev SIGCHLD handler

2012-05-10 Thread Brandon Black
On Thu, May 10, 2012 at 6:28 AM, Vetoshkin Nikita wrote: > So correct SIGCHLD handler should loop calling waitpid() until no zombies > exist. > Please, correct me, if I'm wrong. The code does appear to "loop" on waitpid as you describe, it just does so by feeding itself new events until waitpid(

Re: libev SIGCHLD handler

2012-05-10 Thread Vetoshkin Nikita
Oh, I think I got it. childcb() schedules EV_SIGNAL, which triggers another call to childcb() from eventloop. Am I right? 2012/5/10 Brandon Black : > On Thu, May 10, 2012 at 6:28 AM, Vetoshkin Nikita > wrote: >> So correct SIGCHLD handler should loop calling waitpid() until no zombies >> exist.