diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-15 10:31:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-24 10:13:32 +0100 |
commit | 623ac03b1bf4b66b7f0cc5c03e24c7ee10bd8147 (patch) | |
tree | 84add23614d9b8d3a6fd3ac39a0d02d217d63037 /bitbake | |
parent | c3af55d95c201b0c968cdcd17835146793357680 (diff) | |
download | poky-623ac03b1bf4b66b7f0cc5c03e24c7ee10bd8147.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: 0637703046d3f3f7d3bfdd1e5ecb524440897c35)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7e0af70fb53fb13f824ca954b8cc1dffee730233)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-worker | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 7d982f90ba..3ca8c1853b 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -513,9 +513,11 @@ except BaseException as e: | |||
513 | import traceback | 513 | import traceback |
514 | sys.stderr.write(traceback.format_exc()) | 514 | sys.stderr.write(traceback.format_exc()) |
515 | sys.stderr.write(str(e)) | 515 | sys.stderr.write(str(e)) |
516 | 516 | finally: | |
517 | worker_thread_exit = True | 517 | worker_thread_exit = True |
518 | worker_thread.join() | 518 | worker_thread.join() |
519 | 519 | ||
520 | workerlog_write("exiting") | 520 | workerlog_write("exiting") |
521 | if not normalexit: | ||
522 | sys.exit(1) | ||
521 | sys.exit(0) | 523 | sys.exit(0) |