Home GnuPG

w32: Have PROCESS_HANDLE in struct assuan_context_s.

Description

w32: Have PROCESS_HANDLE in struct assuan_context_s.

* src/assuan-defs.h (struct assuan_context_s): Add process_handle
field.  It's "int" instead of DWORD, because of getpid function.
* src/assuan-pipe-connect.c (initial_handshake): Set ->process_handle,
not override ->pid.
* src/assuan-socket-connect.c (assuan_connect_finalize): Likewise.
* src/system-w32.c (w32_fdpass_send): Use ->process_handle.

In the client code, ctx->pid (by the function assuan_get_pid) may be
used to watch the finish of server process. Thus, it should not be
overridden. See: gnupg/agent/call-daemon.c.

  • GnuPG-bug-id: T6236
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Nov 9 2022, 3:33 AM
Parents
rA7e6f3f007d64: tests: Use common code for Windows.
Branches
Unknown
Tags
Unknown
Tasks
T6236: libassuan: Support sendfd/recvfd (possibly by new API) on Windows