]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/qemurunner: Use oe._exit(), not sys.exit()
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Sep 2021 09:21:58 +0000 (10:21 +0100)
committerSteve Sakoman <steve@sakoman.com>
Thu, 30 Sep 2021 14:20:38 +0000 (04:20 -1000)
sys.exit will cause finally statements and other code to run at exit. Since
we're using os.fork() here, os._exit() is apprioriate in this codepath.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ec08498ff29de9ccd23be88b9d7af3dab6bbb81e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/utils/qemurunner.py

index f7e5a3b3a64f6bcd8bd4f0020047ce18e6db9f92..de0dff3ff01cd4de83dcbef41649a10f3adc9027 100644 (file)
@@ -234,7 +234,7 @@ class QemuRunner:
             r = os.fdopen(r)
             x = r.read()
             os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
-            sys.exit(0)
+            os._exit(0)
 
         self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid)
         self.logger.debug("waiting at most %s seconds for qemu pid (%s)" %