Patchwork oeqa/utils/httpserver: Reset SIGTERM handler

login
register
mail settings
Submitter Richard Purdie
Date Aug. 23, 2014, 8:23 a.m.
Message ID <1408782190.5457.3.camel@ted>
Download mbox | patch
Permalink /patch/78859/
State Accepted
Commit f4786027baf410ae6d8c513826c633602fee4ec2
Headers show

Comments

Richard Purdie - Aug. 23, 2014, 8:23 a.m.
With bitbake-worker installing a SIGTERM handler, we now need to reset the one here
to ensure that when this process shuts down, it doesn't take the rest of the task
with it. This does appear to be the only place in OE that we have this problem.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch

diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index f161a1b..76518d8 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -5,6 +5,8 @@  import os
 class HTTPServer(SimpleHTTPServer.BaseHTTPServer.HTTPServer):
 
     def server_start(self, root_dir):
+        import signal
+        signal.signal(signal.SIGTERM, signal.SIG_DFL)
         os.chdir(root_dir)
         self.serve_forever()