Descriptionbase: wait for children to terminate.
I screwed up and assumed that you can't race the kernel. But it turns
out that it's possible to obverse a child in the process of dying. The
kernel will close the child's file descriptors before waitpid knows that
the child is dead.
Rather than rewrite everything (in an area of the code which has had
lots of issues in the past), I'm opting to do a blocking wait for the
child to die. The code higher up already copes with waitpid() failing,
but we'll miss some crashes if it does. With this patch, we'll wait up
to 250ms for the termination information on a child.
We are, no doubt, blocking a latency sensitive thread with this.
However, the race window in the kernel is small, so doesn't really block
for > a millisecond or so. We do have to consider the case where a buggy
child closes its file descriptor without dying. In that case, we'll
block for the full 250ms but that indicates a serious bug in the child.
BUG=63531
TEST=nagivating to about:gpucrash on linux and checking the we know that the child crashed.
Patch Set 1 #
Messages
Total messages: 2 (0 generated)
|