diff options
author | Werner Koch <wk@gnupg.org> | 2004-04-21 14:42:17 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2004-04-21 14:42:17 +0000 |
commit | 93595de1ede96dedfcaa93c7442536a2cde0b6ef (patch) | |
tree | a0bd56b9a61f7f5301ea2337df1b215bbb318b38 /src/assuan-connect.c | |
parent | 66a87269d11d55dc6b348a94a37b9176c4449bd0 (diff) | |
download | libassuan-93595de1ede96dedfcaa93c7442536a2cde0b6ef.tar.gz |
* assuan-socket-server.c (accept_connection_bottom): Save the pid
of the peer if it is available.
* assuan-socket-connect.c (assuan_socket_connect): Do not save the
dummy SERVED_PID arg.
* assuan-pipe-connect.c (do_finish): Don't wait if the pid is 0.
(assuan_pipe_connect2): Store the parents pid in the environment
of the child.
* assuan-pipe-server.c (assuan_init_pipe_server): Initialize the
peer's pid from the environment.
* assuan-connect.c (assuan_get_pid): Do not return 0 as a PID.
Diffstat (limited to 'src/assuan-connect.c')
-rw-r--r-- | src/assuan-connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/assuan-connect.c b/src/assuan-connect.c index 009aaab..cedaa66 100644 --- a/src/assuan-connect.c +++ b/src/assuan-connect.c @@ -47,8 +47,9 @@ assuan_disconnect (ASSUAN_CONTEXT ctx) } } +/* Return the PID of the perr or -1 if not known. */ pid_t assuan_get_pid (ASSUAN_CONTEXT ctx) { - return ctx ? ctx->pid : -1; + return (ctx && ctx->pid)? ctx->pid : -1; } |