Commit 6ab95220 authored by Kirill Smelkov's avatar Kirill Smelkov

t/qemu-runlinux: Issue terminal resize before running program

Else program inside sees default terminal settings to be 80x25,
while after the patch it sees correct settings.

Still something is not completely right with terminal settings, as e.g.
vsplit is not working correctly in vim (vertical ruler is not straight).
parent ccca055c
......@@ -75,7 +75,7 @@ if [ $$ == 1 ]; then
#env
#set -x
set +e
setsid "$@" <>/dev/ttyS0 >&0 2>&1 # run argv[1:] passed to init
setsid "$0" .qinit2 "$@" <>/dev/ttyS0 >&0 2>&1 # run qinit2 with argv[1:] passed to init
echo "exit code: $?"
qshutdown
......@@ -83,6 +83,17 @@ if [ $$ == 1 ]; then
qdie "unreachable"
fi
# init part spawned from under setsid.
# $0 .qinit2 <command> ...
if [ "$1" == .qinit2 ]; then
# resize terminal to current host's xterm
command -v resize >/dev/null && eval `resize`
# tail to argv[1:] passed to init
shift
exec "$@"
fi
# ---- qemu setup ----
......
Markdown is supported
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