From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 07/10] runqemu: check the qemu PID has been set before kill()ing it
Date: Mon, 13 Dec 2021 05:36:25 -1000 [thread overview]
Message-ID: <7f95eb486a2d07cf0c821d5301fd670de34fe2d1.1639409496.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1639409496.git.steve@sakoman.com>
From: Ross Burton <ross@burtonini.com>
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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0f3afbd3a6a6bef668612f818517df7543c0a683)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
scripts/runqemu | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 10880ba6bb..51607f10e5 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1516,7 +1516,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"])
--
2.25.1
next prev parent reply other threads:[~2021-12-13 15:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 15:36 [OE-core][dunfell 00/10] Patch review Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 01/10] cve-extra-exclusions: add db CVEs to exclusion list Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 02/10] libgcrypt: solve CVE-2021-33560 and CVE-2021-40528 Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 03/10] gcc: Add CVE-2021-37322 to the list of CVEs to ignore Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 04/10] busybox: Fix multiple security issues in awk Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 05/10] wic:direct.py: ignore invalid mountpoints during fstab update Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 06/10] lttng-modules: do not search in non-existing folder during install Steve Sakoman
2021-12-13 15:36 ` Steve Sakoman [this message]
2021-12-13 15:36 ` [OE-core][dunfell 08/10] recipetool: Set master branch only as fallback Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 09/10] selftest/devtool: Check branch in git fetch Steve Sakoman
2021-12-13 15:36 ` [OE-core][dunfell 10/10] selftest: skip virgl test on centos 8 entirely Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f95eb486a2d07cf0c821d5301fd670de34fe2d1.1639409496.git.steve@sakoman.com \
--to=steve@sakoman.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox