mirror of
https://github.com/tmux/tmux.git
synced 2025-01-11 18:58:47 +00:00
Sync OpenBSD patchset 1071:
Move MSG_IDENTIFY to the last sent by the client, this will be needed by control clients and irrelevant for others.
This commit is contained in:
parent
2e2c9bd623
commit
621fa0a686
10
client.c
10
client.c
@ -252,11 +252,6 @@ client_send_identify(int flags)
|
|||||||
strlcpy(data.term, term, sizeof data.term) >= sizeof data.term)
|
strlcpy(data.term, term, sizeof data.term) >= sizeof data.term)
|
||||||
*data.term = '\0';
|
*data.term = '\0';
|
||||||
|
|
||||||
if ((fd = dup(STDIN_FILENO)) == -1)
|
|
||||||
fatal("dup failed");
|
|
||||||
imsg_compose(&client_ibuf,
|
|
||||||
MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data);
|
|
||||||
|
|
||||||
if ((fd = dup(STDOUT_FILENO)) == -1)
|
if ((fd = dup(STDOUT_FILENO)) == -1)
|
||||||
fatal("dup failed");
|
fatal("dup failed");
|
||||||
imsg_compose(&client_ibuf,
|
imsg_compose(&client_ibuf,
|
||||||
@ -266,6 +261,11 @@ client_send_identify(int flags)
|
|||||||
fatal("dup failed");
|
fatal("dup failed");
|
||||||
imsg_compose(&client_ibuf,
|
imsg_compose(&client_ibuf,
|
||||||
MSG_STDERR, PROTOCOL_VERSION, -1, fd, NULL, 0);
|
MSG_STDERR, PROTOCOL_VERSION, -1, fd, NULL, 0);
|
||||||
|
|
||||||
|
if ((fd = dup(STDIN_FILENO)) == -1)
|
||||||
|
fatal("dup failed");
|
||||||
|
imsg_compose(&client_ibuf,
|
||||||
|
MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Forward entire environment to server. */
|
/* Forward entire environment to server. */
|
||||||
|
Loading…
Reference in New Issue
Block a user