Skip to contentSkip to conversation

qemuzephyrrunner.py: use os._exit instead of sys.exit

PATCH New Jon Mason 1 participant 1 message Sep 25, 2021

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 qemuzephyrrunner.py: use os._exit instead of sys.exit

sys.exit(0) can cause an error to be reported when the child exits, even though not an error. Since this is a child process, os._exit(0) is the proper way to exit and not cause this issue.

---
 lib/oeqa/utils/qemuzephyrrunner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/oeqa/utils/qemuzephyrrunner.py +1 -1
index a1ed30be1ca8..7b486ce8af3f 100644
@@ -191,7 +191,7 @@ class QemuZephyrRunner(QemuRunner):
             r = os.fdopen(r)
             x = r.read()
             os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
-            sys.exit(0)
+            os._exit(0)
 
         bb.note("qemu started, pid is %s" % self.runqemu.pid)
         return self.create_socket()
Signature · 1 line
2.20.1