summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-worker
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-09-16 09:51:14 +0100
commit4437754142f6d0e8f3cf9ffbb51c61321b8c5600 (patch)
treebdc3c284cea2aadd315763b94559b994398ae92d /bitbake/bin/bitbake-worker
parent4fb4a6e229e471f2efc092d9dd49e437a8668246 (diff)
downloadpoky-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/bin/bitbake-worker')
-rwxr-xr-xbitbake/bin/bitbake-worker8
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 516finally:
517worker_thread_exit = True 517 worker_thread_exit = True
518worker_thread.join() 518 worker_thread.join()
519 519
520workerlog_write("exiting") 520workerlog_write("exiting")
521if not normalexit:
522 sys.exit(1)
521sys.exit(0) 523sys.exit(0)