summaryrefslogtreecommitdiffstats
path: root/lib/hashserv
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-12 15:56:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-14 14:19:03 +0100
commit05888700e5f6cba48a26c8a4c447634a28e3baa6 (patch)
tree2c2b515f25d13352bdacdeee03eb19c860ba869f /lib/hashserv
parent373b085ead992a725b2230ededd992b4c61a1a05 (diff)
downloadbitbake-05888700e5f6cba48a26c8a4c447634a28e3baa6.tar.gz
cooker: Improve hash server startup code to avoid exit tracebacks
At exit the hashserv code was causing tracebacks as join() wasn't being called from the thread that started the process. Ensure that the hashserver is started from the pre_serve hook which is the final thread the cooker runs in. This avoids the traceback at the expense of some horrific poking into data stores which will ultimately need improving through a proper API. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/hashserv')
-rw-r--r--lib/hashserv/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/hashserv/__init__.py b/lib/hashserv/__init__.py
index 1d5e08ee5..55966e748 100644
--- a/lib/hashserv/__init__.py
+++ b/lib/hashserv/__init__.py
@@ -151,6 +151,7 @@ class ThreadedHTTPServer(HTTPServer):
signal.signal(signal.SIGTERM, self.sigterm_exception)
super().serve_forever()
+ os._exit(0)
def sigterm_exception(self, signum, stackframe):
self.server_close()