Re: [RESEND][RFC PATCH v2] waitfd

From: Davide Libenzi
Date: Sat Jan 10 2009 - 18:14:22 EST


On Sat, 10 Jan 2009, Oleg Nesterov wrote:

> > Thus:
> >
> > - child process #1 dies
> > - main loop woken up by SIGCHLD
> > - pending status of signal cleared
> > - enter wait loop
> > - child process #2 dies
> > - SIGCHLD pending again
> > - waitpid() called first time, child process #1 reaped
> > - waitpid() called second time, child process #2 reaped
> > (SIGCHLD still pending)
> > - waitpid() called third time, no child processes remain
> > - exit wait loop
> > - back to top of main loop, immediately woken up by pending SIGCHLD
> > - pending status of signal cleared
> > - enter wait loop
> > - waitpid() called first time, but no child processes remain
> > (we reaped it last time round)
> > - exit wait loop
> > - back to top of main loop, sleep
>
> Scott, I don't really understand why are you trying to explain this
> all to me. I do understand this. At least I hope ;)

Indeed :)
Scott, you're teaching Linux signals to the guy that is likely the
de-facto mantainer of the subsystem. See the irony?



- Davide


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/