summaryrefslogtreecommitdiffstats
path: root/meta/lib
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 08:11:40 -0700
commit678cca4421c1c54f6bdc0d6ef71e99acd789e28a (patch)
tree4e272217b8e017e61ab2d046363c73b56c8e3e66 /meta/lib
parent5f81d9d1fa537445d5da49e12de1e16300e94552 (diff)
downloadpoky-678cca4421c1c54f6bdc0d6ef71e99acd789e28a.tar.gz
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 (From OE-Core rev: f4bf21b40ec6fa07c4a7bb450e3cfae12128dc2c) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> 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 5366a635fe..337b5874b2 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -163,13 +163,13 @@ class QemuRunner:
163 163
164 if self.runqemu: 164 if self.runqemu:
165 bb.note("Sending SIGTERM to runqemu") 165 bb.note("Sending SIGTERM to runqemu")
166 os.kill(-self.runqemu.pid,signal.SIGTERM) 166 os.killpg(self.runqemu.pid, signal.SIGTERM)
167 endtime = time.time() + self.runqemutime 167 endtime = time.time() + self.runqemutime
168 while self.runqemu.poll() is None and time.time() < endtime: 168 while self.runqemu.poll() is None and time.time() < endtime:
169 time.sleep(1) 169 time.sleep(1)
170 if self.runqemu.poll() is None: 170 if self.runqemu.poll() is None:
171 bb.note("Sending SIGKILL to runqemu") 171 bb.note("Sending SIGKILL to runqemu")
172 os.kill(-self.runqemu.pid,signal.SIGKILL) 172 os.killpg(self.runqemu.pid, signal.SIGKILL)
173 self.runqemu = None 173 self.runqemu = None
174 if self.server_socket: 174 if self.server_socket:
175 self.server_socket.close() 175 self.server_socket.close()