]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/utils/httpserver: Reset SIGTERM handler
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Aug 2014 17:21:41 +0000 (17:21 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Aug 2014 08:29:49 +0000 (09:29 +0100)
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>
meta/lib/oeqa/utils/httpserver.py

index f161a1bddd02538e5549d5f64d44315c9d8983f2..76518d8ef9ef06cf3054fd482d2c3abc0726e054 100644 (file)
@@ -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()