aboutsummaryrefslogtreecommitdiffstats
path: root/got
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-09-30 18:48:35 +0200
committerMattias Andrée <maandree@operamail.com>2013-09-30 18:48:35 +0200
commit403a41f8f2a6077d800ce7dae115a0cc3bd27a76 (patch)
treeb75d58c758bffd2991ac8fb40bc77840778a1001 /got
parentadd comment on mem usage in readme (diff)
downloadgates-of-tartaros-403a41f8f2a6077d800ce7dae115a0cc3bd27a76.tar.gz
gates-of-tartaros-403a41f8f2a6077d800ce7dae115a0cc3bd27a76.tar.bz2
gates-of-tartaros-403a41f8f2a6077d800ce7dae115a0cc3bd27a76.tar.xz
whoops, save and restore the tty not console
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'got')
-rwxr-xr-xgot4
1 files changed, 2 insertions, 2 deletions
diff --git a/got b/got
index eadbe86..740e713 100755
--- a/got
+++ b/got
@@ -64,16 +64,16 @@ if [ "$1" = "-" ]; then
. "@etc@/@command@rc"
fi
+ tty_settings="$(stty --save)"
$display_function
$read_function
$login_function
+ stty "${tty_settings}"
else
# cannot get any other solution to work with `login`
# than to spawn a new process with the pipes pre-set
tty="@dev@/$1"
- tty_settings="$(stty --save)"
"$0" - "$@" > "${tty}" 2> "${tty}" < "${tty}"
- stty "${tty_settings}"
fi