All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] oeqa/utils/qemurunner: use the right kill call so we don't send SIGTERM to bitbake-worker
@ 2014-03-11 12:11 Stefan Stanacar
  0 siblings, 0 replies; only message in thread
From: Stefan Stanacar @ 2014-03-11 12:11 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/lib/oeqa/utils/qemurunner.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c664d00..f1a7e24 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -162,13 +162,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()
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-11 12:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 12:11 [PATCH] oeqa/utils/qemurunner: use the right kill call so we don't send SIGTERM to bitbake-worker Stefan Stanacar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.