diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-15 10:31:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 09:55:51 +0100 |
commit | ba06c29f117af41a9770e83cbf1b76bbb28cb34b (patch) | |
tree | d07a12bd7f88c89f5da5bf03483753aac4e263b2 /bitbake/bin | |
parent | 892977a86239979c0271e44641044fa9babd5a31 (diff) | |
download | poky-ba06c29f117af41a9770e83cbf1b76bbb28cb34b.tar.gz |
bitbake: bitbake-worker: Improve error handling
If bitbake-worker fails, return an error code showing that. Also
make the thread cleanup code explict in a finally clause as it would
otherwise hang.
[YOCTO #14393]
(Bitbake rev: 97541440e982848ef8bdbced22decdc24eda855b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7e0af70fb53fb13f824ca954b8cc1dffee730233)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake-worker | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 97cc0fd60f..9ef0d5a683 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -505,9 +505,11 @@ except BaseException as e: | |||
505 | import traceback | 505 | import traceback |
506 | sys.stderr.write(traceback.format_exc()) | 506 | sys.stderr.write(traceback.format_exc()) |
507 | sys.stderr.write(str(e)) | 507 | sys.stderr.write(str(e)) |
508 | finally: | ||
509 | worker_thread_exit = True | ||
510 | worker_thread.join() | ||
508 | 511 | ||
509 | worker_thread_exit = True | 512 | workerlog_write("exiting") |
510 | worker_thread.join() | 513 | if not normalexit: |
511 | 514 | sys.exit(1) | |
512 | workerlog_write("exitting") | ||
513 | sys.exit(0) | 515 | sys.exit(0) |