#991956 /usr/bin/linux.uml: Interactive use leaves invoking host terminal messed up

Package:
user-mode-linux
Source:
user-mode-linux
Description:
User-mode Linux (kernel)
Submitter:
Ian Jackson
Date:
2021-08-06 17:09:03 UTC
Severity:
minor
#991956#5
Date:
2021-08-06 17:06:22 UTC
From:
To:
Observed behaviour:

(build)root@zealot:/home/ian# stty -a; bwrap --dev-bind / / --tmpfs /dev/shm linux.uml init=/bin/date; stty -a
speed 38400 baud; rows 90; columns 127; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...OK
Adding 27656192 bytes to physical memory to account for exec-shield gap
Linux version 5.10.40 (buildd@x86-csail-01) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 Fri Jun 11 12:02:58 UTC 2021
...
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(98,0)
...
speed 38400 baud; rows 90; columns 127; line = 0;
                                                 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S;
                                               susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
                                                                                                                              -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
                                                                -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel iutf8
                                              -opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
                                                                                                                              -isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
                                                                                                              (build)root@zealo(build)root@zealot:/home/ian#


Expected behaviour:

Unless the process dies of a signal, it should restore the tty
settings.


Workaround:

"stty sane" afterwards, or make a wrapper that saves and restores the
settings eg with stty -g.