Commit 8c3f0d96 authored by Andrew Jones's avatar Andrew Jones Committed by Paolo Bonzini
Browse files

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.
Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 386d4498
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment