[OE-core] [PATCH] qemurunner: Fix killpg pid usage
Richard Purdie
richard.purdie at linuxfoundation.org
Tue Sep 8 22:36:04 UTC 2015
killpg should be being called with a pgid, not a pid.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 1fd07a8..e506ca5 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -264,7 +264,7 @@ class QemuRunner:
os.kill(self.monitorpid, signal.SIGKILL)
logger.info("Sending SIGTERM to runqemu")
try:
- os.killpg(self.runqemu.pid, signal.SIGTERM)
+ os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
except OSError as e:
if e.errno != errno.ESRCH:
raise
@@ -273,7 +273,7 @@ class QemuRunner:
time.sleep(1)
if self.runqemu.poll() is None:
logger.info("Sending SIGKILL to runqemu")
- os.killpg(self.runqemu.pid, signal.SIGKILL)
+ os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL)
self.runqemu = None
if hasattr(self, 'server_socket') and self.server_socket:
self.server_socket.close()
More information about the Openembedded-core
mailing list