summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-05 12:05:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-09 19:04:02 +0100
commitb1b23359a3dcf9a958fff8413bae840e9348b446 (patch)
tree54a8a1f46e594264b9b82b587d5fb22cdee6200c /meta/lib
parent9b48842834d6ab3939237affe5b19facc72031be (diff)
downloadpoky-b1b23359a3dcf9a958fff8413bae840e9348b446.tar.gz
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. (From OE-Core rev: 1b63ce7bb83134f84bf07d1075d5ca0d5466ed3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py4
1 files 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:
350 return True 350 return True
351 351
352 def stop(self): 352 def stop(self):
353 self.stop_thread()
354 self.stop_qemu_system()
355 if hasattr(self, "origchldhandler"): 353 if hasattr(self, "origchldhandler"):
356 signal.signal(signal.SIGCHLD, self.origchldhandler) 354 signal.signal(signal.SIGCHLD, self.origchldhandler)
355 self.stop_thread()
356 self.stop_qemu_system()
357 if self.runqemu: 357 if self.runqemu:
358 if hasattr(self, "monitorpid"): 358 if hasattr(self, "monitorpid"):
359 os.kill(self.monitorpid, signal.SIGKILL) 359 os.kill(self.monitorpid, signal.SIGKILL)