Skip to content
Merged
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
11 changes: 10 additions & 1 deletion devtools/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,13 @@ fi
# Append any extra user-provided QEMU args
QEMU_ARGS+=("${EXTRA_QEMU_ARGS[@]+"${EXTRA_QEMU_ARGS[@]}"}")

exec "$QEMU_BIN" "${QEMU_ARGS[@]}"
# In test mode the guest never reads stdin. Redirect from /dev/null so
# QEMU's -nographic serial setup never calls tcsetattr() on a real
# terminal, which would receive SIGTTOU if the caller piped stdout or
# wrapped boot.sh with timeout(1) (whose child runs in its own process
# group, not the terminal's foreground group).
if [ -n "$TEST_CMD" ]; then
exec "$QEMU_BIN" "${QEMU_ARGS[@]}" < /dev/null
else
exec "$QEMU_BIN" "${QEMU_ARGS[@]}"
fi