diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/runqemu-internal | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index d4825d1548..4f3ba7b882 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal | |||
| @@ -104,6 +104,9 @@ fi | |||
| 104 | 104 | ||
| 105 | NFSRUNNING="false" | 105 | NFSRUNNING="false" |
| 106 | 106 | ||
| 107 | #capture original stty values | ||
| 108 | ORIG_STTY=$(stty -g) | ||
| 109 | |||
| 107 | if [ "$SLIRP_ENABLED" = "yes" ]; then | 110 | if [ "$SLIRP_ENABLED" = "yes" ]; then |
| 108 | KERNEL_NETWORK_CMD="" | 111 | KERNEL_NETWORK_CMD="" |
| 109 | QEMU_TAP_CMD="" | 112 | QEMU_TAP_CMD="" |
| @@ -221,7 +224,11 @@ else | |||
| 221 | fi | 224 | fi |
| 222 | # If QEMU crashes or somehow tty properties are not restored | 225 | # If QEMU crashes or somehow tty properties are not restored |
| 223 | # after qemu exits, we need to run stty sane | 226 | # after qemu exits, we need to run stty sane |
| 224 | stty sane | 227 | #stty sane |
| 228 | |||
| 229 | #instead of using stty sane we set the original stty values | ||
| 230 | stty ${ORIG_STTY} | ||
| 231 | |||
| 225 | } | 232 | } |
| 226 | 233 | ||
| 227 | 234 | ||
| @@ -589,6 +596,8 @@ if [ "$SLIRP_ENABLED" != "yes" ]; then | |||
| 589 | cleanup | 596 | cleanup |
| 590 | fi | 597 | fi |
| 591 | 598 | ||
| 599 | #set the original stty values before exit | ||
| 600 | stty ${ORIG_STTY} | ||
| 592 | trap - INT TERM QUIT | 601 | trap - INT TERM QUIT |
| 593 | 602 | ||
| 594 | return $ret | 603 | return $ret |
