From: Richard Purdie Date: Fri, 5 Oct 2018 11:05:04 +0000 (+0100) Subject: qemurunner: Remove the signal handler before stopping qemu X-Git-Tag: uninative-2.3~124 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=1b63ce7bb83134f84bf07d1075d5ca0d5466ed3d;p=openembedded-core.git qemurunner: Remove the signal handler before stopping qemu The qemu shutdown can race with the signal handler removal leading to confusing tracebacks on slower/loaded systems. Remove the signal handler first before shutting down. Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index c3c643d710..dfab1bd5f1 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -350,10 +350,10 @@ class QemuRunner: return True def stop(self): - self.stop_thread() - self.stop_qemu_system() if hasattr(self, "origchldhandler"): signal.signal(signal.SIGCHLD, self.origchldhandler) + self.stop_thread() + self.stop_qemu_system() if self.runqemu: if hasattr(self, "monitorpid"): os.kill(self.monitorpid, signal.SIGKILL)