Home GnuPG

w32: Cleaner semantics for PID and Process handle.

Description

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: T6487
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on May 17 2023, 3:55 AM
Parents
rAf3b3ddfd7ffb: Fix comments.
Branches
Unknown
Tags
Unknown
Tasks
T6487: libassuan: Clear semantics for assuan_get_pid and improve use cases for process control