From 447780652c8a79b614ae7ca86530e1600a26cfd5 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Tue, 1 Jul 2025 09:21:39 +0200 Subject: [PATCH] build_library/qemu_template.sh: exec qemu instead of calling it This change updates the build library's qemu template to "exec" qemu instead of calling it from the script. While serving the same purpose as calling qemu and returning "$?" (the current implementation), using exec makes it easier to manage the qemu sub-process when the qemu wrapper script is called from another script. --- build_library/qemu_template.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build_library/qemu_template.sh b/build_library/qemu_template.sh index e4c0efc5ad..c05142ca25 100755 --- a/build_library/qemu_template.sh +++ b/build_library/qemu_template.sh @@ -332,12 +332,10 @@ case "${VM_BOARD}" in *) die "Unsupported arch" ;; esac -"$QEMU_BIN" \ +exec "$QEMU_BIN" \ -name "$VM_NAME" \ -m ${VM_MEMORY} \ -netdev user,id=eth0${QEMU_FORWARDED_PORTS:+,}${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \ -device virtio-net-pci,netdev=eth0 \ -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \ "$@" - -exit $?