commit 93b8ee693f60477e77fc0ca16684d6e76155721b
parent a22d66a2a8614efca9f505cd0097e162febce670
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 16 Mar 2026 23:38:07 +0100
adapt to revised GNUNET_process() API one more time
Diffstat:
7 files changed, 63 insertions(+), 75 deletions(-)
diff --git a/src/backend/taler-merchant-depositcheck.c b/src/backend/taler-merchant-depositcheck.c
@@ -817,10 +817,10 @@ start_worker (const char *base_url)
NULL == cfg_filename
? "<default>"
: cfg_filename);
- p = GNUNET_process_create ();
+ p = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
if (NULL == cfg_filename)
- ret = GNUNET_process_set_command_va (
+ ret = GNUNET_process_run_command_va (
p,
"taler-merchant-depositcheck",
"taler-merchant-depositcheck",
@@ -830,7 +830,7 @@ start_worker (const char *base_url)
test_mode ? "-t" : NULL,
NULL);
else
- ret = GNUNET_process_set_command_va (
+ ret = GNUNET_process_run_command_va (
p,
"taler-merchant-depositcheck",
"taler-merchant-depositcheck",
@@ -840,9 +840,7 @@ start_worker (const char *base_url)
"-T", toff,
test_mode ? "-t" : NULL,
NULL);
- if ( (GNUNET_OK != ret) ||
- (GNUNET_OK !=
- GNUNET_process_start (p)) )
+ if (GNUNET_OK != ret)
{
GNUNET_process_destroy (p);
return NULL;
diff --git a/src/backend/taler-merchant-httpd_post-challenge-ID.c b/src/backend/taler-merchant-httpd_post-challenge-ID.c
@@ -442,20 +442,18 @@ phase_send_challenge (struct MfaState *mfa)
"pipe");
return;
}
- mfa->child = GNUNET_process_create ();
+ mfa->child = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
GNUNET_assert (GNUNET_OK ==
GNUNET_process_set_options (
mfa->child,
GNUNET_process_option_inherit_rpipe (p,
STDIN_FILENO)));
- if ( (GNUNET_OK !=
- GNUNET_process_set_command_va (mfa->child,
- prog,
- prog,
- mfa->required_address,
- NULL)) ||
- (GNUNET_OK !=
- GNUNET_process_start (mfa->child)) )
+ if (GNUNET_OK !=
+ GNUNET_process_run_command_va (mfa->child,
+ prog,
+ prog,
+ mfa->required_address,
+ NULL))
{
GNUNET_process_destroy (mfa->child);
mfa->child = NULL;
diff --git a/src/backend/taler-merchant-report-generator.c b/src/backend/taler-merchant-report-generator.c
@@ -416,25 +416,23 @@ transmit_report (struct ReportActivity *ra,
return;
}
- ra->proc = GNUNET_process_create ();
+ ra->proc = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
GNUNET_assert (GNUNET_OK ==
GNUNET_process_set_options (
ra->proc,
GNUNET_process_option_inherit_rpipe (stdin_pipe,
STDIN_FILENO)));
- if ( (GNUNET_OK !=
- GNUNET_process_set_command_va (ra->proc,
- binary,
- binary,
- "-d",
- ra->report_description,
- "-m",
- ra->mime_type,
- "-t",
- ra->target_address,
- NULL)) ||
- (GNUNET_OK !=
- GNUNET_process_start (ra->proc)) )
+ if (GNUNET_OK !=
+ GNUNET_process_run_command_va (ra->proc,
+ binary,
+ binary,
+ "-d",
+ ra->report_description,
+ "-m",
+ ra->mime_type,
+ "-t",
+ ra->target_address,
+ NULL))
{
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
"exec",
diff --git a/src/testing/testing_api_cmd_depositcheck.c b/src/testing/testing_api_cmd_depositcheck.c
@@ -63,18 +63,16 @@ depositcheck_run (void *cls,
struct DepositcheckState *ws = cls;
(void) cmd;
- ws->depositcheck_proc = GNUNET_process_create ();
- if ( (GNUNET_OK !=
- GNUNET_process_set_command_va (ws->depositcheck_proc,
- "taler-merchant-depositcheck",
- "taler-merchant-depositcheck",
- "-c", ws->config_filename,
- "-t", /* exit when done */
- "-T", "1200s",
- "-L", "INFO",
- NULL)) ||
- (GNUNET_OK !=
- GNUNET_process_start (ws->depositcheck_proc)) )
+ ws->depositcheck_proc = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
+ if (GNUNET_OK !=
+ GNUNET_process_run_command_va (ws->depositcheck_proc,
+ "taler-merchant-depositcheck",
+ "taler-merchant-depositcheck",
+ "-c", ws->config_filename,
+ "-t", /* exit when done */
+ "-T", "1200s",
+ "-L", "INFO",
+ NULL))
{
GNUNET_break (0);
GNUNET_process_destroy (ws->depositcheck_proc);
diff --git a/src/testing/testing_api_cmd_exec_donaukeyupdate.c b/src/testing/testing_api_cmd_exec_donaukeyupdate.c
@@ -61,17 +61,16 @@ donaukeyupdate_run (void *cls,
struct DonaukeyupdateState *as = cls;
(void) cmd;
- as->donaukeyupdate_proc = GNUNET_process_create ();
- if ( (GNUNET_OK !=
- GNUNET_process_set_command_va (as->donaukeyupdate_proc,
- "taler-merchant-donaukeyupdate",
- "taler-merchant-donaukeyupdate",
- "-c", as->config_filename,
- "-L", "INFO",
- "-t", /* exit when done */
- NULL)) ||
- (GNUNET_OK !=
- GNUNET_process_start (as->donaukeyupdate_proc)) )
+ as->donaukeyupdate_proc
+ = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
+ if (GNUNET_OK !=
+ GNUNET_process_run_command_va (as->donaukeyupdate_proc,
+ "taler-merchant-donaukeyupdate",
+ "taler-merchant-donaukeyupdate",
+ "-c", as->config_filename,
+ "-L", "INFO",
+ "-t", /* exit when done */
+ NULL))
{
GNUNET_break (0);
GNUNET_process_destroy (as->donaukeyupdate_proc);
diff --git a/src/testing/testing_api_cmd_tme.c b/src/testing/testing_api_cmd_tme.c
@@ -62,18 +62,17 @@ tme_run (void *cls,
struct MerchantExchangeState *ws = cls;
(void) cmd;
- ws->merchant_reconciliation_proc = GNUNET_process_create ();
- if ( (GNUNET_OK !=
- GNUNET_process_set_command_va (ws->merchant_reconciliation_proc,
- "taler-merchant-reconciliation",
- "taler-merchant-reconciliation",
- "-c", ws->config_filename,
- "-t", /* exit when done */
- "-T", "1200s",
- "-L", "INFO",
- NULL)) ||
- (GNUNET_OK !=
- GNUNET_process_start (ws->merchant_reconciliation_proc)) )
+ ws->merchant_reconciliation_proc
+ = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
+ if (GNUNET_OK !=
+ GNUNET_process_run_command_va (ws->merchant_reconciliation_proc,
+ "taler-merchant-reconciliation",
+ "taler-merchant-reconciliation",
+ "-c", ws->config_filename,
+ "-t", /* exit when done */
+ "-T", "1200s",
+ "-L", "INFO",
+ NULL))
{
GNUNET_break (0);
GNUNET_process_destroy (ws->merchant_reconciliation_proc);
diff --git a/src/testing/testing_api_cmd_webhook.c b/src/testing/testing_api_cmd_webhook.c
@@ -62,17 +62,15 @@ webhook_run (void *cls,
struct WebhookState *ws = cls;
(void) cmd;
- ws->webhook_proc = GNUNET_process_create ();
- if ( (GNUNET_OK !=
- GNUNET_process_set_command_va (ws->webhook_proc,
- "taler-merchant-webhook",
- "taler-merchant-webhook",
- "-c", ws->config_filename,
- "-t", /* exit when done */
- "-L", "DEBUG",
- NULL)) ||
- (GNUNET_OK !=
- GNUNET_process_start (ws->webhook_proc)) )
+ ws->webhook_proc = GNUNET_process_create (GNUNET_OS_INHERIT_STD_ERR);
+ if (GNUNET_OK !=
+ GNUNET_process_run_command_va (ws->webhook_proc,
+ "taler-merchant-webhook",
+ "taler-merchant-webhook",
+ "-c", ws->config_filename,
+ "-t", /* exit when done */
+ "-L", "DEBUG",
+ NULL))
{
GNUNET_break (0);
GNUNET_process_destroy (ws->webhook_proc);