summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authornicm <nicm>2020-06-01 09:43:00 +0000
committernicm <nicm>2020-06-01 09:43:00 +0000
commita54a88edd6fd893d4370feb9f9136e13096b891c (patch)
tree1e42bf42d42c31e1ef3c059aaf1ae25ae6ef3bd5 /cmd-new-session.c
parent175e45005f4572b19a4aa34094f9a8c69ced5475 (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 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index be29122d..cc3494de 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -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");