diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-19 08:42:07 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-19 08:42:07 +0000 |
commit | 4b4ca199b889eb9f83636a4440711c3e46fc2e8b (patch) | |
tree | 44f8602db51f6b3537692aadcdce83a46d49cde8 /usr.bin | |
parent | 44d1907dca38eb8d75d26b9aa791e766a8677d14 (diff) |
Move MSG_IDENTIFY to the last sent by the client, this will be needed by
control clients and irrelevant for others.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/client.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index e48d33454c9..4723fa21942 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.49 2012/03/09 09:57:40 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.50 2012/03/19 08:42:06 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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. */ |