summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-14 21:23:20 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-14 21:23:20 +0000
commite2a18894b34e3651feecba1dd43c4f05c9566509 (patch)
treea15c5d4ff41e637982452222ede90d433dbc10a6 /client.c
parent0714e411488e01273729bc0801e197a8f64d5540 (diff)
Sync OpenBSD patchset 246:
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/client.c b/client.c
index a7a6aafc..8395b78a 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.62 2009-08-14 21:04:04 tcunha Exp $ */
+/* $Id: client.c,v 1.63 2009-08-14 21:23:20 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -123,7 +123,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);