aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-08-11 22:16:04 +0000
committerTiago Cunha <tcunha@gmx.com>2010-08-11 22:16:04 +0000
commit761bd3c9e3abd835086fad770e32d00642b74591 (patch)
tree0197279d824c92e9fd013751588daa1281945c73 /tty.c
parent5e9429e2d6eb2b6da947cb8e26ee2369a0e110e2 (diff)
downloadrtmux-761bd3c9e3abd835086fad770e32d00642b74591.tar.gz
rtmux-761bd3c9e3abd835086fad770e32d00642b74591.tar.bz2
rtmux-761bd3c9e3abd835086fad770e32d00642b74591.zip
Sync OpenBSD patchset 745:
Change the way backoff works. Instead of stopping reading from the pty when the client tty backs up too much, just stop updating the tty and only update the internal screen. Then when the tty recovers, force a redraw. This prevents a dodgy client from causing other clients to go into backoff while still allowing tmux to be responsive (locally) when seeing lots of output.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 3814dde7..3ce3af36 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.192 2010-06-06 00:30:34 tcunha Exp $ */
+/* $Id: tty.c,v 1.193 2010-08-11 22:16:04 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -578,7 +578,9 @@ tty_write(void (*cmdfn)(
continue;
if (c->session->curw->window == wp->window) {
- if (c->tty.flags & TTY_FREEZE || c->tty.term == NULL)
+ if (c->tty.term == NULL)
+ continue;
+ if (c->tty.flags & (TTY_FREEZE|TTY_BACKOFF))
continue;
cmdfn(&c->tty, ctx);
}