aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prserv
diff options
context:
space:
mode:
authorDiego Santa Cruz <Diego.SantaCruz@spinetix.com>2016-02-02 13:05:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:46:01 +0000
commit655ec800d54da581229f12efb6f0baf54975fed4 (patch)
tree59d385f0369dbd08a058160bcb41bf986d67d010 /lib/prserv
parentbc867c81e3894da5bdd2e45fa695bb5f5f1bb58b (diff)
downloadbitbake-655ec800d54da581229f12efb6f0baf54975fed4.tar.gz
bitbake: prserv: SIGTERM handling hung process
The current SIGTERM handler hungs the process instead of making it exit. The problem seems to be that the handler thread is not signaled to quit, so it stays there doing its work, as it is not a daemon thread. Setting the quit variable fixes this. While at it, to not use the SystemExit exception to terminate upon SIGTERM but instead left the quit flag do its job. This way the PID file is properly removed. [YOCTO #9035] Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/prserv')
-rw-r--r--lib/prserv/serv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index 1303f12b4..94d2abc15 100644
--- a/lib/prserv/serv.py
+++ b/lib/prserv/serv.py
@@ -103,7 +103,7 @@ class PRServer(SimpleXMLRPCServer):
def sigterm_handler(self, signum, stack):
if self.table:
self.table.sync()
- raise SystemExit
+ self.quit=True
def process_request(self, request, client_address):
self.requestqueue.put((request, client_address))