mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Use single stdout and stderr for control clients.
This commit is contained in:
parent
a6ad44f111
commit
412ac6bc3a
@ -153,6 +153,7 @@ server_client_lost(struct client *c)
|
|||||||
|
|
||||||
evbuffer_free (c->stdin_data);
|
evbuffer_free (c->stdin_data);
|
||||||
evbuffer_free (c->stdout_data);
|
evbuffer_free (c->stdout_data);
|
||||||
|
if (c->stderr_data != c->stdout_data)
|
||||||
evbuffer_free (c->stderr_data);
|
evbuffer_free (c->stderr_data);
|
||||||
|
|
||||||
status_free_jobs(&c->status_new);
|
status_free_jobs(&c->status_new);
|
||||||
@ -955,6 +956,8 @@ server_client_msg_identify(
|
|||||||
|
|
||||||
if (data->flags & IDENTIFY_CONTROL) {
|
if (data->flags & IDENTIFY_CONTROL) {
|
||||||
c->stdin_callback = control_callback;
|
c->stdin_callback = control_callback;
|
||||||
|
evbuffer_free(c->stderr_data);
|
||||||
|
c->stderr_data = c->stdout_data;
|
||||||
c->flags |= CLIENT_CONTROL;
|
c->flags |= CLIENT_CONTROL;
|
||||||
if (data->flags & IDENTIFY_TERMIOS)
|
if (data->flags & IDENTIFY_TERMIOS)
|
||||||
evbuffer_add_printf(c->stdout_data, "\033P1000p");
|
evbuffer_add_printf(c->stdout_data, "\033P1000p");
|
||||||
|
@ -546,6 +546,10 @@ server_push_stderr(struct client *c)
|
|||||||
struct msg_stderr_data data;
|
struct msg_stderr_data data;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
|
if (c->stderr_data == c->stdout_data) {
|
||||||
|
server_push_stdout(c);
|
||||||
|
return;
|
||||||
|
}
|
||||||
size = EVBUFFER_LENGTH(c->stderr_data);
|
size = EVBUFFER_LENGTH(c->stderr_data);
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user