summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2014-03-11 14:11:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-11 07:52:41 -0700
commitf4bf21b40ec6fa07c4a7bb450e3cfae12128dc2c (patch)
treebd9e313494231946ce114ecafd008b08ce54f385 /meta/lib/oeqa/utils
parente41aa22d7938c200f4150155589f5e23ed0331ce (diff)
downloadopenembedded-core-f4bf21b40ec6fa07c4a7bb450e3cfae12128dc2c.tar.gz
openembedded-core-f4bf21b40ec6fa07c4a7bb450e3cfae12128dc2c.tar.bz2
openembedded-core-f4bf21b40ec6fa07c4a7bb450e3cfae12128dc2c.zip
oeqa/utils/qemurunner: use the right kill call so we don't send SIGTERM to bitbake-worker
After recent bitbake-worker changes [1] this was killing the bitbake-worker, which isn't what we want and kill(-pid) was the wrong call anyway. runqemu.pid is the right PGID as the process was started with preexec_fn=setpgrp (so no need to do os.getpgid(self.runqemu.pid)) [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=15688798520896690561824b2fdc227c8a365c82 Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> 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 5366a635fe..337b5874b2 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -163,13 +163,13 @@ class QemuRunner:
if self.runqemu:
bb.note("Sending SIGTERM to runqemu")
- os.kill(-self.runqemu.pid,signal.SIGTERM)
+ os.killpg(self.runqemu.pid, signal.SIGTERM)
endtime = time.time() + self.runqemutime
while self.runqemu.poll() is None and time.time() < endtime:
time.sleep(1)
if self.runqemu.poll() is None:
bb.note("Sending SIGKILL to runqemu")
- os.kill(-self.runqemu.pid,signal.SIGKILL)
+ os.killpg(self.runqemu.pid, signal.SIGKILL)
self.runqemu = None
if self.server_socket:
self.server_socket.close()