bitbake: runqueue: Really fix sigchld handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Mar 2014 22:58:52 +0000 (22:58 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Mar 2014 23:05:53 +0000 (23:05 +0000)
commit3528d7132ba87c23ce6904311f14f74b8a414381
tree1fdbd84562649e2e6cd38517a6db8628a0d78094
parent3e73f6d09665578b75f0e794aeb8a885060324bf
bitbake: runqueue: Really fix sigchld handling

There are several problems. Firstly, a return value of "None" can mean
there is a C signal handler installed so we need to better handle that
case. signal.SIG_DFL is 0 which equates to false so we also need to
handle that by testing explicitly for None.

Finally, the signal handler *must* call waitpid on all child processes
else it will just get called repeatedly, leading to the hanging behaviour
we've been seeing. The solution is to only error for the worker children,
we warn about any other stray children which we'll have to figure out the
sources of in due course.

Hopefully this patch gets things working again properly though.

(Bitbake rev: 973876c706f08735c1b68c791a5a137e5f083dd2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/runqueue.py