summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-08 23:36:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-09 14:27:47 +0100
commite87c182b6caf2a48f95acd8e3e7220f6075460cf (patch)
treedb7d164376bd90dd9309a85b90fc46f0aa047715 /meta/lib/oeqa/utils
parent335260cbfcedc7c348f2e190400efbae67ad92ff (diff)
downloadpoky-e87c182b6caf2a48f95acd8e3e7220f6075460cf.tar.gz
qemurunner: Fix killpg pid usage
killpg should be being called with a pgid, not a pid. (From OE-Core rev: d23bf86f305a04a47d19236d72979c1027a31620) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-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 3f3fd8b71c..78acb41276 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -264,7 +264,7 @@ class QemuRunner:
264 os.kill(self.monitorpid, signal.SIGKILL) 264 os.kill(self.monitorpid, signal.SIGKILL)
265 logger.info("Sending SIGTERM to runqemu") 265 logger.info("Sending SIGTERM to runqemu")
266 try: 266 try:
267 os.killpg(self.runqemu.pid, signal.SIGTERM) 267 os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
268 except OSError as e: 268 except OSError as e:
269 if e.errno != errno.ESRCH: 269 if e.errno != errno.ESRCH:
270 raise 270 raise
@@ -273,7 +273,7 @@ class QemuRunner:
273 time.sleep(1) 273 time.sleep(1)
274 if self.runqemu.poll() is None: 274 if self.runqemu.poll() is None:
275 logger.info("Sending SIGKILL to runqemu") 275 logger.info("Sending SIGKILL to runqemu")
276 os.killpg(self.runqemu.pid, signal.SIGKILL) 276 os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL)
277 self.runqemu = None 277 self.runqemu = None
278 if hasattr(self, 'server_socket') and self.server_socket: 278 if hasattr(self, 'server_socket') and self.server_socket:
279 self.server_socket.close() 279 self.server_socket.close()