diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-06-01 09:43:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-06-01 09:43:02 +0000 |
commit | 9e33e9e6ff644fdd908fb72906c173eb4fdff131 (patch) | |
tree | d10b166e5252cb388cba4bd5edd90ab4a3dca9e1 /usr.bin/tmux/cmd-new-session.c | |
parent | 5cdd307bc12e232741c4797e9e7c3c184c9d50d5 (diff) |
Instead of sending all data to control mode clients as fast as possible,
add a limit of how much data will be sent to the client and try to use
it for panes with some degree of fairness. GitHub issue 2217, with
George Nachman.
Diffstat (limited to 'usr.bin/tmux/cmd-new-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-new-session.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c index 5ad1e71bf02..85b91949f9a 100644 --- a/usr.bin/tmux/cmd-new-session.c +++ b/usr.bin/tmux/cmd-new-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-session.c,v 1.134 2020/05/24 09:13:06 nicm Exp $ */ +/* $OpenBSD: cmd-new-session.c,v 1.135 2020/06/01 09:43:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -165,7 +165,10 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) * the terminal as that calls tcsetattr() to prepare for tmux taking * over. */ - if (!detached && !already_attached && c->fd != -1) { + if (!detached && + !already_attached && + c->fd != -1 && + (~c->flags & CLIENT_CONTROL)) { if (server_client_check_nested(cmdq_get_client(item))) { cmdq_error(item, "sessions should be nested with care, " "unset $TMUX to force"); |