gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 02/04: - make PREFIX work for communicator, to use valgrind and


From: gnunet
Subject: [gnunet] 02/04: - make PREFIX work for communicator, to use valgrind and gdb
Date: Tue, 21 Jul 2020 12:37:24 +0200

This is an automated email from the git hooks/post-receive script.

t3sserakt pushed a commit to branch master
in repository gnunet.

commit d63986fa2002fcee65dff17746b2b8154289a543
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Tue Jul 21 12:14:35 2020 +0200

    - make PREFIX work for communicator, to use valgrind and gdb
---
 src/transport/transport-testing2.c | 32 ++++++++++++++++++++++----------
 1 file 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!");

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]