1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-31 22:18:03 +02:00

Rename the enum constant to GNUPG_PROCESS_GET_PROC_ID.

And use GetProcessId on Windows in the implementation.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-05-02 14:53:44 +09:00
parent 7cadbf4e18
commit b674a704e9
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
4 changed files with 7 additions and 7 deletions

View File

@ -857,7 +857,7 @@ process_vctl (gnupg_process_t process, unsigned int request, va_list arg_ptr)
case GNUPG_PROCESS_NOP:
return 0;
case GNUPG_PROCESS_GET_ID:
case GNUPG_PROCESS_GET_PROC_ID:
{
int *r_id = va_arg (arg_ptr, int *);

View File

@ -974,14 +974,14 @@ process_vctl (gnupg_process_t process, unsigned int request, va_list arg_ptr)
case GNUPG_PROCESS_NOP:
return 0;
case GNUPG_PROCESS_GET_ID:
case GNUPG_PROCESS_GET_PROC_ID:
{
int *r_id = va_arg (arg_ptr, int *);
if (r_id == NULL)
return GPG_ERR_INV_VALUE;
*r_id = (int)process->hProcess;
*r_id = (int)GetProcessId (process->hProcess);
return 0;
}

View File

@ -140,7 +140,7 @@ enum gnupg_process_requests
{
/* Portable requests */
GNUPG_PROCESS_NOP = 0,
GNUPG_PROCESS_GET_ID = 1,
GNUPG_PROCESS_GET_PROC_ID = 1,
GNUPG_PROCESS_GET_EXIT_ID = 2,
/* POSIX only */

View File

@ -445,8 +445,8 @@ ldap_reaper_thread (void *dummy)
{
int status;
gnupg_process_ctl (ctx->proc,
GNUPG_PROCESS_GET_EXIT_ID, &status);
gnupg_process_ctl (ctx->proc, GNUPG_PROCESS_GET_EXIT_ID,
&status);
if (DBG_EXTPROG)
log_info (_("ldap wrapper %d ready"), (int)ctx->printable_pid);
ctx->ready = 1;
@ -861,7 +861,7 @@ ldap_wrapper (ctrl_t ctrl, ksba_reader_t *reader, const char *argv[])
}
gnupg_process_get_streams (process, GNUPG_PROCESS_STREAM_NONBLOCK,
NULL, &outfp, &errfp);
gnupg_process_ctl (process, GNUPG_PROCESS_GET_ID, &ctx->printable_pid);
gnupg_process_ctl (process, GNUPG_PROCESS_GET_PROC_ID, &ctx->printable_pid);
ctx->proc = process;
ctx->fp = outfp;