[bitbake-devel] [PATCH] bitbake-worker child process create group before registering SIGTERM handler

Richard Purdie richard.purdie at linuxfoundation.org
Wed Nov 6 13:59:38 UTC 2019


On Tue, 2019-11-05 at 19:07 +0500, Ivan Efimov via bitbake-devel wrote:
> The bitbake-worker child on the SIGTERM signal handling send the
> SIGTERM to all
> processes in it's process group. In cases when the bitbake-worker
> child got
> SIGTERM after registering own SIGTERM handler and before the
> os.setsid() call
> it can send SIGTERM to unwanted processes.
> 
> In the worst case during SIGTERM processing the bitbake-worker child
> can be in
> the group of the process that started BitBake itself. As a result it
> can kill
> processes that not related to BitBake at all.
> 
> Signed-off-by: Ivan Efimov <i.efimov at inango-systems.com>
> ---
>  bin/bitbake-worker | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

That could explain a few things, nice catch, thanks!

Cheers,

Richard



More information about the bitbake-devel mailing list