summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-11 21:28:11 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-11 21:28:11 +0000
commit4310282a4c52f1885ae2eb80b106c9c03564a0b8 (patch)
tree21099e70cdd49e4dc08084bbd758e64677728774 /client.c
parent4ec8ade11c23eec4b652cdd7ea47ddf346b7be93 (diff)
Have the client pass its stdin fd to the server when identifying itself and
have the server use that rather than reopening the tty. If the fd isn't given, use the old behaviour (so no need for a version change). This allows tmux to be used as the shell, so also change so that when working out the command to execute if default-command is empty (the default), tmux will try not execute itself.
Diffstat (limited to 'client.c')
-rw-r--r--client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.c b/client.c
index a56af84e..0bbe6056 100644
--- a/client.c
+++ b/client.c
@@ -119,7 +119,8 @@ server_started:
if (strlcpy(data.tty, name, sizeof data.tty) >= sizeof data.tty)
fatalx("ttyname failed");
- client_write_server(cctx, MSG_IDENTIFY, &data, sizeof data);
+ imsg_compose(&cctx->ibuf, MSG_IDENTIFY,
+ PROTOCOL_VERSION, -1, STDIN_FILENO, &data, sizeof data);
}
return (0);