From 1b63ce7bb83134f84bf07d1075d5ca0d5466ed3d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 5 Oct 2018 12:05:04 +0100 Subject: 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 --- meta/lib/oeqa/utils/qemurunner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- cgit 1.2.3-korg