version 1.89, 2015/06/04 23:27:51 |
version 1.90, 2015/06/14 10:07:44 |
|
|
void |
void |
client_send_identify(int flags) |
client_send_identify(int flags) |
{ |
{ |
const char *s; |
const char *s; |
char **ss; |
char **ss; |
int fd; |
int fd; |
|
pid_t pid; |
|
|
client_write_one(MSG_IDENTIFY_FLAGS, -1, &flags, sizeof flags); |
client_write_one(MSG_IDENTIFY_FLAGS, -1, &flags, sizeof flags); |
|
|
|
|
if ((fd = dup(STDIN_FILENO)) == -1) |
if ((fd = dup(STDIN_FILENO)) == -1) |
fatal("dup failed"); |
fatal("dup failed"); |
client_write_one(MSG_IDENTIFY_STDIN, fd, NULL, 0); |
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++) |
for (ss = environ; *ss != NULL; ss++) |
client_write_one(MSG_IDENTIFY_ENVIRON, -1, *ss, strlen(*ss) + 1); |
client_write_one(MSG_IDENTIFY_ENVIRON, -1, *ss, strlen(*ss) + 1); |