diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-03-19 08:42:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-03-19 08:42:06 +0000 |
commit | bf9e7a1c688eaa48dc2c0900ccd12a06e35c3ae4 (patch) | |
tree | 52a094b8dbcc6d9b5e35b7370648b2919cc80f69 /client.c | |
parent | d8805af66bb876d762248d1695872eca3296f0e6 (diff) | |
download | rtmux-bf9e7a1c688eaa48dc2c0900ccd12a06e35c3ae4.tar.gz rtmux-bf9e7a1c688eaa48dc2c0900ccd12a06e35c3ae4.tar.bz2 rtmux-bf9e7a1c688eaa48dc2c0900ccd12a06e35c3ae4.zip |
Move MSG_IDENTIFY to the last sent by the client, this will be needed by
control clients and irrelevant for others.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -250,11 +250,6 @@ client_send_identify(int flags) strlcpy(data.term, term, sizeof data.term) >= sizeof data.term) *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) fatal("dup failed"); imsg_compose(&client_ibuf, @@ -264,6 +259,11 @@ client_send_identify(int flags) fatal("dup failed"); imsg_compose(&client_ibuf, 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. */ |