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-16 09:51:14 +0100 |
commit | 4437754142f6d0e8f3cf9ffbb51c61321b8c5600 (patch) | |
tree | bdc3c284cea2aadd315763b94559b994398ae92d /bitbake | |
parent | 4fb4a6e229e471f2efc092d9dd49e437a8668246 (diff) | |
download | poky-4437754142f6d0e8f3cf9ffbb51c61321b8c5600.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: 7e0af70fb53fb13f824ca954b8cc1dffee730233)
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) |