summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Dinu <andrei.adrianx.dinu@intel.com>2013-05-28 08:59:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 20:46:17 +0100
commit93e0ae68d2c1827370f4f9e95c2f0b7f98ba2cb8 (patch)
tree03de1be6d8c3ec5bc76d01a9fb4ce05381afc6b7
parent5e06a20403c59f80e0ffa90626a2bab832af7a46 (diff)
downloadopenembedded-core-93e0ae68d2c1827370f4f9e95c2f0b7f98ba2cb8.tar.gz
openembedded-core-93e0ae68d2c1827370f4f9e95c2f0b7f98ba2cb8.tar.bz2
openembedded-core-93e0ae68d2c1827370f4f9e95c2f0b7f98ba2cb8.zip
runqemu: Replaced "stty sane" with saved stty settings
stty manual says : "sane - Resets all modes to reasonable values for interactive terminal use." But reasonable isn't the most viable solution, because we want to keep the original stty settings before running runqemu. Saving the stty settings and setting them at the end of the runqemu script solves the terminal settings differences after the script ran. [Yocto #4512] Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> [Added filename info in commit subject - sgw] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu-internal11
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
NFSRUNNING="false"
+#capture original stty values
+ORIG_STTY=$(stty -g)
+
if [ "$SLIRP_ENABLED" = "yes" ]; then
KERNEL_NETWORK_CMD=""
QEMU_TAP_CMD=""
@@ -221,7 +224,11 @@ else
fi
# If QEMU crashes or somehow tty properties are not restored
# after qemu exits, we need to run stty sane
- stty sane
+ #stty sane
+
+ #instead of using stty sane we set the original stty values
+ stty ${ORIG_STTY}
+
}
@@ -589,6 +596,8 @@ if [ "$SLIRP_ENABLED" != "yes" ]; then
cleanup
fi
+#set the original stty values before exit
+stty ${ORIG_STTY}
trap - INT TERM QUIT
return $ret