diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-01 14:29:19 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-01 14:29:19 +0000 |
commit | 02efedd79b96a42aea682853a52eb5ccbd78eb00 (patch) | |
tree | 32873f9a06d9be09e99e56b3773cae6a101ffe1e /usr.bin/tmux | |
parent | 2e83b76ba409c59168f6100dd716a59e47432842 (diff) |
Use tcflush(3) instead of TIOCFLUSH, from Ed Schouten.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/tty.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index d4ca3ae6180..777b697f116 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.81 2009/12/26 11:02:32 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.82 2010/01/01 14:29:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -146,7 +146,7 @@ void tty_start_tty(struct tty *tty) { struct termios tio; - int what, mode; + int mode; if (tty->fd == -1) return; @@ -170,10 +170,7 @@ tty_start_tty(struct tty *tty) tio.c_cc[VTIME] = 0; if (tcsetattr(tty->fd, TCSANOW, &tio) != 0) fatal("tcsetattr failed"); - - what = 0; - if (ioctl(tty->fd, TIOCFLUSH, &what) != 0) - fatal("ioctl(TIOCFLUSH)"); + tcflush(tty->fd, TCIOFLUSH); tty_putcode(tty, TTYC_SMCUP); |