diff options
author | t3sserakt <t3ss@posteo.de> | 2020-07-21 12:14:35 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-07-21 12:14:35 +0200 |
commit | d63986fa2002fcee65dff17746b2b8154289a543 (patch) | |
tree | 560dab445f76e253d371a39aa8bfc85f877c0879 /src/transport/transport-testing2.c | |
parent | 0c9911d73744da31776f98019ff1460032f2c82b (diff) | |
download | gnunet-d63986fa2002fcee65dff17746b2b8154289a543.tar.gz gnunet-d63986fa2002fcee65dff17746b2b8154289a543.zip |
- make PREFIX work for communicator, to use valgrind and gdb
Diffstat (limited to 'src/transport/transport-testing2.c')
-rw-r--r-- | src/transport/transport-testing2.c | 32 |
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 ( | |||
923 | const char *binary_name) | 923 | const char *binary_name) |
924 | { | 924 | { |
925 | char *binary; | 925 | char *binary; |
926 | char *loprefix; | ||
927 | char *section_name; | ||
926 | 928 | ||
927 | LOG (GNUNET_ERROR_TYPE_DEBUG, "communicator_start\n"); | 929 | LOG (GNUNET_ERROR_TYPE_DEBUG, "communicator_start\n"); |
930 | |||
931 | section_name = strchr (binary_name, '-'); | ||
932 | section_name++; | ||
933 | |||
934 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (tc_h->cfg, | ||
935 | section_name, | ||
936 | "PREFIX", | ||
937 | &loprefix)) | ||
938 | loprefix = GNUNET_strdup (""); | ||
939 | |||
940 | |||
928 | binary = GNUNET_OS_get_libexec_binary_path (binary_name); | 941 | binary = GNUNET_OS_get_libexec_binary_path (binary_name); |
929 | tc_h->c_proc = GNUNET_OS_start_process (GNUNET_YES, | 942 | tc_h->c_proc = GNUNET_OS_start_process_s (GNUNET_YES, |
930 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 943 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
931 | NULL, | 944 | NULL, |
932 | NULL, | 945 | loprefix, |
933 | NULL, | 946 | binary, |
934 | binary, | 947 | binary_name, |
935 | binary_name, | 948 | "-c", |
936 | "-c", | 949 | tc_h->cfg_filename, |
937 | tc_h->cfg_filename, | 950 | NULL); |
938 | NULL); | ||
939 | if (NULL == tc_h->c_proc) | 951 | if (NULL == tc_h->c_proc) |
940 | { | 952 | { |
941 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start communicator!"); | 953 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start communicator!"); |