mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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 ] (From OE-Core rev: 0f3afbd3a6a6bef668612f818517df7543c0a683) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8e8a7add6c
commit
67700e174d
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user