Commit 89fb8992 authored by Kirill Smelkov's avatar Kirill Smelkov

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

This continues 6ab95220 (t/qemu-runlinux: Issue terminal resize before
running program) and fully initializes terminal before spawning user
application.

This has practical effect to restore line wrapping for xterm, as kernel,
initially assuming it has "linux" type terminal, somehow messes xterm
settings: before the patch lines that were wider than terminal width were
not wrapped and characters in the last position were printed over each
other. After the patch printed lines are automatically wrapped and test
output is not lost.

Tput hint found here:

	https://unix.stackexchange.com/questions/105958
parent 208aca62
......@@ -95,6 +95,10 @@ fi
# init part spawned from under setsid.
# $0 .qinit2 <command> ...
if [ "$1" == .qinit2 ]; then
# initialize terminal. In particular this has the effect to restore
# line wrapping for xterm, as kernel, initially assuming it has "linux"
# type terminal, somehow messes xterm settings.
command -v tput >/dev/null && tput init
# resize terminal to current host's xterm
command -v resize >/dev/null && eval `resize`
......
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