diff options
author | nicm <nicm> | 2015-06-14 10:07:44 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-06-14 10:07:44 +0000 |
commit | 29c29e771767b037f2929b889bb0de2b0b6ee138 (patch) | |
tree | 28d2497e9fd6f69da442ed01f1e431bb51f9561c /client.c | |
parent | bbc0898060a02515461cbd90d7af35bf91d9cb3d (diff) | |
download | rtmux-29c29e771767b037f2929b889bb0de2b0b6ee138.tar.gz rtmux-29c29e771767b037f2929b889bb0de2b0b6ee138.tar.bz2 rtmux-29c29e771767b037f2929b889bb0de2b0b6ee138.zip |
Add a format for client PID (client_pid) and server PID (pid). Diff for
client_pid from Thomas Adam.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -348,9 +348,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); @@ -370,6 +371,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); |