diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 22:44:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-12 22:50:14 +0100 |
commit | 68aefbb27de84ef2e59c75be5dc79fe393a563d3 (patch) | |
tree | 38991711db8df545b589d3f642a6ace991cadd05 /bitbake/bin | |
parent | aaa48b69f3021553cef18512b3620a5083c31ba5 (diff) | |
download | openembedded-core-contrib-68aefbb27de84ef2e59c75be5dc79fe393a563d3.tar.gz |
bitbake: bitbake-worker: Ensure pipe closure doesn't crash before killpg()
If the pipe is closed, we want to ensure that we kill any child processes
by triggering the sigterm handler before we exit. This code does that,
hopefully avoiding the remaining process left behind issues on the autobuilder.
(Bitbake rev: 60f6c2818f38c4d9c2d9aaa42acf3071636f4a3b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake-worker | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 5f6543b7e9b..af17b874aa3 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker @@ -87,7 +87,11 @@ def worker_child_fire(event, d): global worker_pipe data = "<event>" + pickle.dumps(event) + "</event>" - worker_pipe.write(data) + try: + worker_pipe.write(data) + except IOError: + sigterm_handler(None, None) + raise bb.event.worker_fire = worker_fire |