From d63986fa2002fcee65dff17746b2b8154289a543 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Tue, 21 Jul 2020 12:14:35 +0200 Subject: - make PREFIX work for communicator, to use valgrind and gdb --- src/transport/transport-testing2.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'src/transport') diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c index 974dc56c1..cbe1159f3 100644 --- a/src/transport/transport-testing2.c +++ b/src/transport/transport-testing2.c @@ -923,19 +923,31 @@ communicator_start ( const char *binary_name) { char *binary; + char *loprefix; + char *section_name; LOG (GNUNET_ERROR_TYPE_DEBUG, "communicator_start\n"); + + section_name = strchr (binary_name, '-'); + section_name++; + + if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (tc_h->cfg, + section_name, + "PREFIX", + &loprefix)) + loprefix = GNUNET_strdup (""); + + binary = GNUNET_OS_get_libexec_binary_path (binary_name); - tc_h->c_proc = GNUNET_OS_start_process (GNUNET_YES, - GNUNET_OS_INHERIT_STD_OUT_AND_ERR, - NULL, - NULL, - NULL, - binary, - binary_name, - "-c", - tc_h->cfg_filename, - NULL); + tc_h->c_proc = GNUNET_OS_start_process_s (GNUNET_YES, + GNUNET_OS_INHERIT_STD_OUT_AND_ERR, + NULL, + loprefix, + binary, + binary_name, + "-c", + tc_h->cfg_filename, + NULL); if (NULL == tc_h->c_proc) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start communicator!"); -- cgit v1.2.3