summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-03-27 20:36:19 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-03-27 20:36:19 +0000
commit71e8e26ccc85a07c59d9b607c0e248376fa0a447 (patch)
tree1e33acdea9d93d265ee174cbacb9416aed46e863 /tty.c
parent7ce8fee4f3ea4a480ffa18cd5d66ba9a7f3626db (diff)
Set the terminal blocking again earlier, before sending the reset
sequences.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 57f0d217..bffb1f93 100644
--- a/tty.c
+++ b/tty.c
@@ -230,6 +230,8 @@ tty_stop_tty(struct tty *tty)
if (tcsetattr(tty->fd, TCSANOW, &tty->tio) == -1)
return;
+ setblocking(tty->fd, 1);
+
tty_raw(tty, tty_term_string2(tty->term, TTYC_CSR, 0, ws.ws_row - 1));
if (tty_use_acs(tty))
tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));
@@ -242,8 +244,6 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, "\033[?1000l");
tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));
-
- setblocking(tty->fd, 1);
}
void