diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-26 22:39:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-26 22:39:32 +0000 |
commit | 447ebb5371c2cdc54aa6d5a39919cfee688c2b8e (patch) | |
tree | 8b901209fb4e8fbbcf68442d7a6ec26e460401c6 /src/arm/arm_api.c | |
parent | 73c61a51290216778e5e8b7152fcbd48ef1b3131 (diff) | |
download | gnunet-447ebb5371c2cdc54aa6d5a39919cfee688c2b8e.tar.gz gnunet-447ebb5371c2cdc54aa6d5a39919cfee688c2b8e.zip |
allow spaces in binary file names (#3094)
Diffstat (limited to 'src/arm/arm_api.c')
-rw-r--r-- | src/arm/arm_api.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index 9644026d6..d27b6b780 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -759,6 +759,7 @@ arm_service_report (void *cls, | |||
759 | unsigned char test_is_active; | 759 | unsigned char test_is_active; |
760 | char *cbinary; | 760 | char *cbinary; |
761 | char *binary; | 761 | char *binary; |
762 | char *quotedbinary; | ||
762 | char *config; | 763 | char *config; |
763 | char *loprefix; | 764 | char *loprefix; |
764 | char *lopostfix; | 765 | char *lopostfix; |
@@ -817,6 +818,9 @@ arm_service_report (void *cls, | |||
817 | cm->h->cfg, "arm", "CONFIG", &config)) | 818 | cm->h->cfg, "arm", "CONFIG", &config)) |
818 | config = NULL; | 819 | config = NULL; |
819 | binary = GNUNET_OS_get_libexec_binary_path (cbinary); | 820 | binary = GNUNET_OS_get_libexec_binary_path (cbinary); |
821 | GNUNET_asprintf ("edbinary, | ||
822 | "\"%s\"", | ||
823 | binary); | ||
820 | GNUNET_free (cbinary); | 824 | GNUNET_free (cbinary); |
821 | if ((GNUNET_YES == GNUNET_CONFIGURATION_have_value ( | 825 | if ((GNUNET_YES == GNUNET_CONFIGURATION_have_value ( |
822 | cm->h->cfg, "TESTING", "WEAKRANDOM")) && | 826 | cm->h->cfg, "TESTING", "WEAKRANDOM")) && |
@@ -829,12 +833,12 @@ arm_service_report (void *cls, | |||
829 | /* we're clearly running a test, don't daemonize */ | 833 | /* we're clearly running a test, don't daemonize */ |
830 | if (NULL == config) | 834 | if (NULL == config) |
831 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, | 835 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, |
832 | NULL, loprefix, binary, | 836 | NULL, loprefix, quotedbinary, |
833 | /* no daemonization! */ | 837 | /* no daemonization! */ |
834 | lopostfix, NULL); | 838 | lopostfix, NULL); |
835 | else | 839 | else |
836 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, | 840 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, |
837 | NULL, loprefix, binary, "-c", config, | 841 | NULL, loprefix, quotedbinary, "-c", config, |
838 | /* no daemonization! */ | 842 | /* no daemonization! */ |
839 | lopostfix, NULL); | 843 | lopostfix, NULL); |
840 | } | 844 | } |
@@ -842,14 +846,15 @@ arm_service_report (void *cls, | |||
842 | { | 846 | { |
843 | if (NULL == config) | 847 | if (NULL == config) |
844 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, | 848 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, |
845 | NULL, loprefix, binary, | 849 | NULL, loprefix, quotedbinary, |
846 | "-d", lopostfix, NULL); | 850 | "-d", lopostfix, NULL); |
847 | else | 851 | else |
848 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, | 852 | proc = do_start_process (GNUNET_NO, cm->std_inheritance, |
849 | NULL, loprefix, binary, "-c", config, | 853 | NULL, loprefix, quotedbinary, "-c", config, |
850 | "-d", lopostfix, NULL); | 854 | "-d", lopostfix, NULL); |
851 | } | 855 | } |
852 | GNUNET_free (binary); | 856 | GNUNET_free (binary); |
857 | GNUNET_free (quotedbinary); | ||
853 | GNUNET_free_non_null (config); | 858 | GNUNET_free_non_null (config); |
854 | GNUNET_free (loprefix); | 859 | GNUNET_free (loprefix); |
855 | GNUNET_free (lopostfix); | 860 | GNUNET_free (lopostfix); |