[oe-commits] [openembedded-core] 58/58: qemurunner.py: fix is_alive() to avoid confusing with recycled pid

git at git.openembedded.org git at git.openembedded.org
Wed Jul 25 21:46:28 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit cc8167c607bc0ccfdb741e3329060158fbf522b1
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Wed Jul 25 16:34:33 2018 +0800

    qemurunner.py: fix is_alive() to avoid confusing with recycled pid
    
    [YOCTO #12493]
    
    Fixed:
    - qemu started with pid 10000
    - qemu exited unexpectedly
    - The pid 10000 is re-used by another different process.
    
    The is_alive() returned True in such a case because both qemu_pidfile and
    /proc/10000 exist, but it's another process, this patch fixed the problem.
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/utils/qemurunner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c8bd651..c3c643d 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -400,7 +400,7 @@ class QemuRunner:
         return False
 
     def is_alive(self):
-        if not self.runqemu:
+        if not self.runqemu or self.runqemu.poll() is not None:
             return False
         if os.path.isfile(self.qemu_pidfile):
             f = open(self.qemu_pidfile, 'r')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list