summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-15 10:31:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-02 09:55:51 +0100
commitba06c29f117af41a9770e83cbf1b76bbb28cb34b (patch)
treed07a12bd7f88c89f5da5bf03483753aac4e263b2 /bitbake/bin
parent892977a86239979c0271e44641044fa9babd5a31 (diff)
downloadpoky-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-xbitbake/bin/bitbake-worker10
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))
508finally:
509 worker_thread_exit = True
510 worker_thread.join()
508 511
509worker_thread_exit = True 512workerlog_write("exiting")
510worker_thread.join() 513if not normalexit:
511 514 sys.exit(1)
512workerlog_write("exitting")
513sys.exit(0) 515sys.exit(0)