diff options
author | Diego Santa Cruz <Diego.SantaCruz@spinetix.com> | 2016-02-02 13:05:50 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-04 23:47:48 +0000 |
commit | abf8a8fbc35c8d45c2357701400477792e39f80e (patch) | |
tree | 5f0a012ea74bd5bd8dddecf754c3f38f3ea3275d /bitbake | |
parent | be032fc40eb315841fdd1f69c780726619ea1bad (diff) | |
download | poky-abf8a8fbc35c8d45c2357701400477792e39f80e.tar.gz |
bitbake: 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]
(Bitbake rev: 655ec800d54da581229f12efb6f0baf54975fed4)
Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/prserv/serv.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py index 1303f12b45..94d2abc15d 100644 --- a/bitbake/lib/prserv/serv.py +++ b/bitbake/lib/prserv/serv.py | |||
@@ -103,7 +103,7 @@ class PRServer(SimpleXMLRPCServer): | |||
103 | def sigterm_handler(self, signum, stack): | 103 | def sigterm_handler(self, signum, stack): |
104 | if self.table: | 104 | if self.table: |
105 | self.table.sync() | 105 | self.table.sync() |
106 | raise SystemExit | 106 | self.quit=True |
107 | 107 | ||
108 | def process_request(self, request, client_address): | 108 | def process_request(self, request, client_address): |
109 | self.requestqueue.put((request, client_address)) | 109 | self.requestqueue.put((request, client_address)) |