summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-06-14 12:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2015-06-14 12:01:10 +0100
commit37005d04a9a3871ca4c41e8ed47569f4061532f9 (patch)
treef41dcec4f2bf19e91dc31f513620f7ff3db9a525 /client.c
parent48a46e066ed2836cf8b58da65a2d730011702ee5 (diff)
parent29c29e771767b037f2929b889bb0de2b0b6ee138 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/client.c b/client.c
index 7d997a7e..9c493dfa 100644
--- a/client.c
+++ b/client.c
@@ -352,9 +352,10 @@ client_main(int argc, char **argv, int flags)
void
client_send_identify(int flags)
{
- const char *s;
+ const char *s;
char **ss;
- int fd;
+ int fd;
+ pid_t pid;
client_write_one(MSG_IDENTIFY_FLAGS, -1, &flags, sizeof flags);
@@ -374,6 +375,9 @@ client_send_identify(int flags)
fatal("dup failed");
client_write_one(MSG_IDENTIFY_STDIN, fd, NULL, 0);
+ pid = getpid();
+ client_write_one(MSG_IDENTIFY_CLIENTPID, -1, &pid, sizeof pid);
+
for (ss = environ; *ss != NULL; ss++)
client_write_one(MSG_IDENTIFY_ENVIRON, -1, *ss, strlen(*ss) + 1);