diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 0357f99d92..5624977561 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -258,8 +258,9 @@ class QemuRunner: | |||
258 | 258 | ||
259 | def stop(self): | 259 | def stop(self): |
260 | self.stop_thread() | 260 | self.stop_thread() |
261 | if self.runqemu: | 261 | if hasattr(self, "origchldhandler"): |
262 | signal.signal(signal.SIGCHLD, self.origchldhandler) | 262 | signal.signal(signal.SIGCHLD, self.origchldhandler) |
263 | if self.runqemu: | ||
263 | os.kill(self.monitorpid, signal.SIGKILL) | 264 | os.kill(self.monitorpid, signal.SIGKILL) |
264 | logger.info("Sending SIGTERM to runqemu") | 265 | logger.info("Sending SIGTERM to runqemu") |
265 | try: | 266 | try: |
@@ -279,7 +280,6 @@ class QemuRunner: | |||
279 | self.server_socket = None | 280 | self.server_socket = None |
280 | self.qemupid = None | 281 | self.qemupid = None |
281 | self.ip = None | 282 | self.ip = None |
282 | signal.signal(signal.SIGCHLD, self.origchldhandler) | ||
283 | 283 | ||
284 | def stop_thread(self): | 284 | def stop_thread(self): |
285 | if self.thread and self.thread.is_alive(): | 285 | if self.thread and self.thread.is_alive(): |