aboutsummaryrefslogtreecommitdiffstats
path: root/src/system-posix.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-05-17 01:55:17 +0000
committerNIIBE Yutaka <[email protected]>2023-05-17 01:55:17 +0000
commit6350f796fdd1c7519c35a9cd71b33b6dafc5ed3a (patch)
treeb95049d835579972a6f0236b018d68a2f5082aac /src/system-posix.c
parentFix comments. (diff)
downloadlibassuan-6350f796fdd1c7519c35a9cd71b33b6dafc5ed3a.tar.gz
libassuan-6350f796fdd1c7519c35a9cd71b33b6dafc5ed3a.zip
w32: Cleaner semantics for PID and Process handle.
* src/assuan-defs.h (struct assuan_context_s): Introduce SERVER_PROC member. Clarify the use of PROCESS_ID and PID. Introduce assuan_pid_t for internal use of process id or handle. * src/assuan.h.in: Follow the change. * src/assuan.c (assuan_new_ext): Likewise. * src/client.c (_assuan_client_finish): Likewise. * src/assuan-pipe-connect.c (pipe_connect): Likewise. * src/server.c (_assuan_server_finish): Likewise. * src/system-posix.c: Likewise. * src/system-w32.c: Likewise. * src/system.c: Likewise. * src/assuan-pipe-server.c (assuan_init_pipe_server) [HAVE_W32_SYSTEM]: Exclude the use of _assuan_pipe_connect_pid. * src/assuan-socket-server.c (accept_connection_bottom) [HAVE_W32_SYSTEM]: Exclude the use of the member peercred.pid. * src/assuan-socket.c (_assuan_sock_check_nonce): Support Cygwin Unix domain emulation for having valid client process ID. * src/context.c (assuan_get_pid): Clarify the use cases. * src/posix-types.inc.h, src/w32-types.inc.h: Introduce assuan_pid_t. -- GnuPG-bug-id: 6487 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src/system-posix.c')
-rw-r--r--src/system-posix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/system-posix.c b/src/system-posix.c
index 0f7732a..5f3a7f2 100644
--- a/src/system-posix.c
+++ b/src/system-posix.c
@@ -266,7 +266,7 @@ get_max_fds (void)
int
-__assuan_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
+__assuan_spawn (assuan_context_t ctx, assuan_pid_t *r_pid, const char *name,
const char **argv,
assuan_fd_t fd_in, assuan_fd_t fd_out,
assuan_fd_t *fd_child_list,
@@ -394,8 +394,8 @@ __assuan_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
/* FIXME: Add some sort of waitpid function that covers GPGME and
gpg-agent's use of assuan. */
-pid_t
-__assuan_waitpid (assuan_context_t ctx, pid_t pid, int nowait,
+assuan_pid_t
+__assuan_waitpid (assuan_context_t ctx, assuan_pid_t pid, int nowait,
int *status, int options)
{
/* We can't just release the PID, a waitpid is mandatory. But