runqemu: check the qemu PID has been set before kill()ing it
PATCH 1/1 runqemu: check the qemu PID has been set before kill()ing it
If runqemu is killed, check that we have a valid PID for the qemu before sending a kill() to it.
[ YOCTO #14651 ]
Signed-off-by Ross Burton <[email protected]>
--- scripts/runqemu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/runqemu +2 -1
@@ -1593,7 +1593,8 @@ def main(): def sigterm_handler(signum, frame): logger.info("SIGTERM received") - os.kill(config.qemupid, signal.SIGTERM) + if config.qemupid: + os.kill(config.qemupid, signal.SIGTERM) config.cleanup() # Deliberately ignore the return code of 'tput smam'. subprocess.call(["tput", "smam"])
Signature · 1 line
2.25.1