summaryrefslogtreecommitdiffstats
path: root/g13/runner.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2024-07-23 13:53:20 +0200
committerWerner Koch <wk@gnupg.org>2024-07-23 13:53:20 +0200
commit8b1f35a78f01cae97ddfe52708743d07ed42b07f (patch)
treec296a27d01306b7bfc9db692cc2add0c43a79e93 /g13/runner.c
parentRevert "speedo: Use remote gitrep if local does not exist" (diff)
downloadgnupg2-8b1f35a78f01cae97ddfe52708743d07ed42b07f.tar.xz
gnupg2-8b1f35a78f01cae97ddfe52708743d07ed42b07f.zip
g13: Finish migration to gpgrt_process_spawn API
-- Fixes-commit: 953dd67368ceaeb8b42cfb8f9b5f3c4de8afdbe0
Diffstat (limited to 'g13/runner.c')
-rw-r--r--g13/runner.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/g13/runner.c b/g13/runner.c
index 19ed46f52..8f4ca9ecf 100644
--- a/g13/runner.c
+++ b/g13/runner.c
@@ -54,7 +54,7 @@ struct runner_s
2 = Thread is running and someone is holding a reference. */
int refcount;
- gnupg_process_t proc; /* Process of the backend's process (the engine). */
+ gpgrt_process_t proc; /* Process of the backend's process (the engine). */
int in_fd; /* File descriptors to read from the engine. */
int out_fd; /* File descriptors to write to the engine. */
engine_handler_fnc_t handler; /* The handler functions. */
@@ -159,13 +159,13 @@ runner_release (runner_t runner)
if (runner->proc)
{
/* The process has not been cleaned up - do it now. */
- gnupg_process_terminate (runner->proc);
+ gpgrt_process_terminate (runner->proc);
/* (Actually we should use the program name and not the
arbitrary NAME of the runner object. However it does not
matter because that information is only used for
diagnostics.) */
- gnupg_process_wait (runner->proc, 1);
- gnupg_process_release (runner->proc);
+ gpgrt_process_wait (runner->proc, 1);
+ gpgrt_process_release (runner->proc);
}
xfree (runner->name);
@@ -268,7 +268,7 @@ runner_set_fds (runner_t runner, int in_fd, int out_fd)
/* Set the PROC of the backend engine. After this call the engine is
owned by the runner object. */
void
-runner_set_proc (runner_t runner, gnupg_process_t proc)
+runner_set_proc (runner_t runner, gpgrt_process_t proc)
{
if (check_already_spawned (runner, "runner_set_proc"))
return;
@@ -370,10 +370,10 @@ runner_thread (void *arg)
int exitcode;
log_debug ("runner thread waiting ...\n");
- err = gnupg_process_wait (runner->proc, 1);
+ err = gpgrt_process_wait (runner->proc, 1);
if (!err)
- gnupg_process_ctl (runner->proc, GNUPG_PROCESS_GET_EXIT_ID, &exitcode);
- gnupg_process_release (runner->proc);
+ gpgrt_process_ctl (runner->proc, GPGRT_PROCESS_GET_EXIT_ID, &exitcode);
+ gpgrt_process_release (runner->proc);
runner->proc = NULL;
if (exitcode)
log_error ("running '%s' failed (exitcode=%d): %s\n",
@@ -474,7 +474,7 @@ runner_cancel (runner_t runner)
need to change the thread to wait on an event. */
runner->cancel_flag = 1;
/* For now we use the brutal way and kill the process. */
- gnupg_process_terminate (runner->proc);
+ gpgrt_process_terminate (runner->proc);
}
}