bitbake-worker: Improve error handling
PATCH 1/1 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.
Signed-off-by Richard Purdie <[email protected]>
--- bin/bitbake-worker | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
bin/bitbake-worker +5 -3
@@ -512,9 +512,11 @@ except BaseException as e: import traceback sys.stderr.write(traceback.format_exc()) sys.stderr.write(str(e)) - -worker_thread_exit = True -worker_thread.join() +finally: + worker_thread_exit = True + worker_thread.join() workerlog_write("exiting") +if not normalexit: + sys.exit(1) sys.exit(0)
Signature · 1 line
2.32.0