Because of the buffered IO, the possible scenario could occur:
- netlink uevents (plural) occur, i.e. data ready on stdin
- iopause triggered, handle_stdin() called. The first uevent is processed, child
launched, we're waiting for a signal
- SIGCHLD occurs, we're back to iopausing on stdin
On 06/14/15 21:11, Laurent Bercot wrote:
On 14/06/2015 14:37, Olivier Brunel wrote:
Because of the buffered IO, the possible scenario could occur:
- netlink uevents (plural) occur, i.e. data ready on stdin
- iopause triggered, handle_stdin() called. The first uevent is
processed, child
On 14/06/2015 21:57, Olivier Brunel wrote:
That is, in your test now you're using x[1] even though it might not
have been used in the iopause call before, so while I guess this isn't
random memory, it doesn't really feel right either.
You're right, of course, that's why the else was there in
On 14/06/2015 14:37, Olivier Brunel wrote:
Because of the buffered IO, the possible scenario could occur:
- netlink uevents (plural) occur, i.e. data ready on stdin
- iopause triggered, handle_stdin() called. The first uevent is processed, child
launched, we're waiting for a signal
- SIGCHLD