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>
This commit is contained in:
Richard Purdie
2021-09-15 10:31:56 +01:00
parent 4fb4a6e229
commit 4437754142

View File

@@ -513,9 +513,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)