arch-run: fix terminal issues without stty
PATCH 1/1 arch-run: fix terminal issues without stty
This patch reverts the stty parts of 8727c886 "runtime: better handling of QEMU aborts", as we can more robustly fix the same issue by simply redirecting /dev/null into qemu's stdin. The obvious side effect of this is that serial input will no longer be wired up to the tty (or any other input file descriptor), but unit tests do not, and should not, be reading from the serial port anyway.
--- scripts/arch-run.bash | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
scripts/arch-run.bash +2 -4
@@ -26,15 +26,13 @@ ############################################################################## run_qemu () { - local stdout errors ret sig tty + local stdout errors ret sig # stdout to {stdout}, stderr to $errors and stderr - tty=$(stty -g) exec {stdout}>&1 - errors=$("${@}" 2> >(tee /dev/stderr) > /dev/fd/$stdout) + errors=$("${@}" </dev/null 2> >(tee /dev/stderr) > /dev/fd/$stdout) ret=$? exec {stdout}>&- - stty "$tty" [ $ret -eq 134 ] && echo "QEMU Aborted" >&2
Signature · 1 line
2.9.3
Quoted 26 lines · Andrew Jones
This patch reverts the stty parts of
8727c886"runtime: better handling of QEMU aborts", as we can more robustly fix the same issue by simply redirecting/dev/nullinto qemu's stdin. The obvious side effect of this is that serial input will no longer be wired up to the tty (or any other input file descriptor), but unit tests do not, and should not, be reading from the serial port anyway.Signed-off-by Andrew Jones <[email protected]>--- scripts/arch-run.bash | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)scripts/arch-run.bash +1
-1@@ -26,15 +26,13 @@ ############################################################################## run_qemu () { - local stdout errors ret sig tty + local stdout errors ret sig # stdout to {stdout}, stderr to $errors and stderr
scripts/arch-run.bash line 38
Quoted 10 lines
scripts/arch-run.bash +1
-3- tty=$(stty -g) exec {stdout}>&1 - errors=$("${@}" 2> >(tee /dev/stderr) > /dev/fd/$stdout) + errors=$("${@}" </dev/null 2> >(tee /dev/stderr) > /dev/fd/$stdout) ret=$? exec {stdout}>&- - stty "$tty" [ $ret -eq 134 ] && echo "QEMU Aborted" >&2
Queued, thanks.