Add a format for client PID (client_pid) and server PID (pid). Diff for

client_pid from Thomas Adam.
This commit is contained in:
nicm
2015-06-14 10:07:44 +00:00
parent bbc0898060
commit 29c29e7717
5 changed files with 18 additions and 2 deletions

View File

@@ -1044,6 +1044,7 @@ server_client_msg_dispatch(struct client *c)
case MSG_IDENTIFY_CWD:
case MSG_IDENTIFY_STDIN:
case MSG_IDENTIFY_ENVIRON:
case MSG_IDENTIFY_CLIENTPID:
case MSG_IDENTIFY_DONE:
server_client_msg_identify(c, &imsg);
break;
@@ -1218,6 +1219,11 @@ server_client_msg_identify(struct client *c, struct imsg *imsg)
if (strchr(data, '=') != NULL)
environ_put(&c->environ, data);
break;
case MSG_IDENTIFY_CLIENTPID:
if (datalen != sizeof c->pid)
fatalx("bad MSG_IDENTIFY_CLIENTPID size");
memcpy(&c->pid, data, sizeof c->pid);
break;
default:
break;
}