We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 89c800f + 37cf3aa commit ddca0e0Copy full SHA for ddca0e0
1 file changed
devtools/boot.sh
@@ -86,4 +86,13 @@ fi
86
# Append any extra user-provided QEMU args
87
QEMU_ARGS+=("${EXTRA_QEMU_ARGS[@]+"${EXTRA_QEMU_ARGS[@]}"}")
88
89
-exec "$QEMU_BIN" "${QEMU_ARGS[@]}"
+# In test mode the guest never reads stdin. Redirect from /dev/null so
90
+# QEMU's -nographic serial setup never calls tcsetattr() on a real
91
+# terminal, which would receive SIGTTOU if the caller piped stdout or
92
+# wrapped boot.sh with timeout(1) (whose child runs in its own process
93
+# group, not the terminal's foreground group).
94
+if [ -n "$TEST_CMD" ]; then
95
+ exec "$QEMU_BIN" "${QEMU_ARGS[@]}" < /dev/null
96
+else
97
+ exec "$QEMU_BIN" "${QEMU_ARGS[@]}"
98
+fi
0 commit comments