Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_library/qemu_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ if [ -n "${SWTPM_DIR}" ]; then
# The swtpm process exits if qemu disconnects but if we never started qemu because
# this script fails or qemu failed to start, we need to kill the process.
# The EXIT trap is already in use by the config drive cleanup and anyway doesn't work with kill -9.
(while [ -e "/proc/${PARENT}" ]; do sleep 1; done; kill "${SWTPM_PROC}" 2>/dev/null; exit 0) &
(while kill -0 "${PARENT}" 2>/dev/null; do sleep 1; done; kill "${SWTPM_PROC}" 2>/dev/null; exit 0) &
set -- -chardev "socket,id=chrtpm,path=${SWTPM_SOCK}" -tpmdev emulator,id=tpm0,chardev=chrtpm -device "${TPM_DEV}",tpmdev=tpm0 "$@"
fi

Expand Down
1 change: 1 addition & 0 deletions changelog/bugfixes/2026-08-20-qemu-swtpm-proc-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed swtpm process cleanup in QEMU launcher on macOS by using POSIX kill -0 instead of checking Linux-only /proc.