mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-31 11:41:32 +01: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:
parent
7cadbf4e18
commit
b674a704e9
@ -857,7 +857,7 @@ process_vctl (gnupg_process_t process, unsigned int request, va_list arg_ptr)
|
|||||||
case GNUPG_PROCESS_NOP:
|
case GNUPG_PROCESS_NOP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case GNUPG_PROCESS_GET_ID:
|
case GNUPG_PROCESS_GET_PROC_ID:
|
||||||
{
|
{
|
||||||
int *r_id = va_arg (arg_ptr, int *);
|
int *r_id = va_arg (arg_ptr, int *);
|
||||||
|
|
||||||
|
@ -974,14 +974,14 @@ process_vctl (gnupg_process_t process, unsigned int request, va_list arg_ptr)
|
|||||||
case GNUPG_PROCESS_NOP:
|
case GNUPG_PROCESS_NOP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case GNUPG_PROCESS_GET_ID:
|
case GNUPG_PROCESS_GET_PROC_ID:
|
||||||
{
|
{
|
||||||
int *r_id = va_arg (arg_ptr, int *);
|
int *r_id = va_arg (arg_ptr, int *);
|
||||||
|
|
||||||
if (r_id == NULL)
|
if (r_id == NULL)
|
||||||
return GPG_ERR_INV_VALUE;
|
return GPG_ERR_INV_VALUE;
|
||||||
|
|
||||||
*r_id = (int)process->hProcess;
|
*r_id = (int)GetProcessId (process->hProcess);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ enum gnupg_process_requests
|
|||||||
{
|
{
|
||||||
/* Portable requests */
|
/* Portable requests */
|
||||||
GNUPG_PROCESS_NOP = 0,
|
GNUPG_PROCESS_NOP = 0,
|
||||||
GNUPG_PROCESS_GET_ID = 1,
|
GNUPG_PROCESS_GET_PROC_ID = 1,
|
||||||
GNUPG_PROCESS_GET_EXIT_ID = 2,
|
GNUPG_PROCESS_GET_EXIT_ID = 2,
|
||||||
|
|
||||||
/* POSIX only */
|
/* POSIX only */
|
||||||
|
@ -445,8 +445,8 @@ ldap_reaper_thread (void *dummy)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
gnupg_process_ctl (ctx->proc,
|
gnupg_process_ctl (ctx->proc, GNUPG_PROCESS_GET_EXIT_ID,
|
||||||
GNUPG_PROCESS_GET_EXIT_ID, &status);
|
&status);
|
||||||
if (DBG_EXTPROG)
|
if (DBG_EXTPROG)
|
||||||
log_info (_("ldap wrapper %d ready"), (int)ctx->printable_pid);
|
log_info (_("ldap wrapper %d ready"), (int)ctx->printable_pid);
|
||||||
ctx->ready = 1;
|
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,
|
gnupg_process_get_streams (process, GNUPG_PROCESS_STREAM_NONBLOCK,
|
||||||
NULL, &outfp, &errfp);
|
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->proc = process;
|
||||||
ctx->fp = outfp;
|
ctx->fp = outfp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user