Skip to contentSkip to conversation

oeqa/utils/httpserver: Reset SIGTERM handler

PATCH New Richard Purdie 1 participant 1 message Aug 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/utils/httpserver: Reset SIGTERM handler

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.

meta/lib/oeqa/utils/httpserver.py +2 -0
index f161a1b..76518d8 100644
@@ -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()