summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-07-21 12:14:35 +0200
committert3sserakt <t3ss@posteo.de>2020-07-21 12:14:35 +0200
commitd63986fa2002fcee65dff17746b2b8154289a543 (patch)
tree560dab445f76e253d371a39aa8bfc85f877c0879 /src
parent0c9911d73744da31776f98019ff1460032f2c82b (diff)
- make PREFIX work for communicator, to use valgrind and gdb
Diffstat (limited to 'src')
-rw-r--r--src/transport/transport-testing2.c32
1 files changed, 22 insertions, 10 deletions
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!");