summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-worker
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-09 22:44:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:50:14 +0100
commit68aefbb27de84ef2e59c75be5dc79fe393a563d3 (patch)
tree38991711db8df545b589d3f642a6ace991cadd05 /bitbake/bin/bitbake-worker
parentaaa48b69f3021553cef18512b3620a5083c31ba5 (diff)
downloadpoky-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/bitbake-worker')
-rwxr-xr-xbitbake/bin/bitbake-worker6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 5f6543b7e9..af17b874aa 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -87,7 +87,11 @@ def worker_child_fire(event, d):
87 global worker_pipe 87 global worker_pipe
88 88
89 data = "<event>" + pickle.dumps(event) + "</event>" 89 data = "<event>" + pickle.dumps(event) + "</event>"
90 worker_pipe.write(data) 90 try:
91 worker_pipe.write(data)
92 except IOError:
93 sigterm_handler(None, None)
94 raise
91 95
92bb.event.worker_fire = worker_fire 96bb.event.worker_fire = worker_fire
93 97