aboutsummaryrefslogtreecommitdiff
path: root/src/arm
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-29 16:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-29 16:14:03 +0000
commitbcbcf005b4864ac5557c31da10521126d8880849 (patch)
tree444cafefb16e1c5a4ba13ce2db07d6ec1f37675e /src/arm
parent119193d6350bbbd8c6ecbd60ccc8301223d6f6d6 (diff)
downloadgnunet-bcbcf005b4864ac5557c31da10521126d8880849.tar.gz
gnunet-bcbcf005b4864ac5557c31da10521126d8880849.zip
installing all service, daemon and helper binaries to lib/gnunet/libexec/; updating code to run binaries from new location, which is no longer in PATH
Diffstat (limited to 'src/arm')
-rw-r--r--src/arm/Makefile.am6
-rw-r--r--src/arm/do_start_process.c28
2 files changed, 32 insertions, 2 deletions
diff --git a/src/arm/Makefile.am b/src/arm/Makefile.am
index 76aec40b6..f91e4210f 100644
--- a/src/arm/Makefile.am
+++ b/src/arm/Makefile.am
@@ -2,6 +2,8 @@ INCLUDES = -I$(top_srcdir)/src/include
2 2
3pkgcfgdir= $(pkgdatadir)/config.d/ 3pkgcfgdir= $(pkgdatadir)/config.d/
4 4
5libexecdir= $(pkglibdir)/libexec/
6
5pkgcfg_DATA = \ 7pkgcfg_DATA = \
6 arm.conf 8 arm.conf
7 9
@@ -27,7 +29,9 @@ libgnunetarm_la_LDFLAGS = \
27 29
28 30
29bin_PROGRAMS = \ 31bin_PROGRAMS = \
30 gnunet-arm \ 32 gnunet-arm
33
34libexec_PROGRAMS = \
31 gnunet-service-arm \ 35 gnunet-service-arm \
32 mockup-service 36 mockup-service
33 37
diff --git a/src/arm/do_start_process.c b/src/arm/do_start_process.c
index 1bc56d540..0687fa345 100644
--- a/src/arm/do_start_process.c
+++ b/src/arm/do_start_process.c
@@ -1,3 +1,23 @@
1/*
2 This file is part of GNUnet.
3 (C) 2011, 2012 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
1/** 21/**
2 * Actually start a process. All of the arguments given to this 22 * Actually start a process. All of the arguments given to this
3 * function are strings that are used for the "argv" array. However, 23 * function are strings that are used for the "argv" array. However,
@@ -27,6 +47,7 @@ do_start_process (int pipe_control, unsigned int std_inheritance,
27 char *cp; 47 char *cp;
28 const char *last; 48 const char *last;
29 struct GNUNET_OS_Process *proc; 49 struct GNUNET_OS_Process *proc;
50 char *binary_path;
30 51
31 argv_size = 1; 52 argv_size = 1;
32 va_start (ap, first_arg); 53 va_start (ap, first_arg);
@@ -98,9 +119,14 @@ do_start_process (int pipe_control, unsigned int std_inheritance,
98/* *INDENT-ON* */ 119/* *INDENT-ON* */
99 va_end (ap); 120 va_end (ap);
100 argv[argv_size] = NULL; 121 argv[argv_size] = NULL;
101 proc = GNUNET_OS_start_process_v (pipe_control, std_inheritance, lsocks, argv[0], argv); 122 binary_path = GNUNET_OS_get_libexec_binary_path (argv[0]);
123 proc = GNUNET_OS_start_process_v (pipe_control, std_inheritance, lsocks,
124 binary_path, argv);
102 while (argv_size > 0) 125 while (argv_size > 0)
103 GNUNET_free (argv[--argv_size]); 126 GNUNET_free (argv[--argv_size]);
104 GNUNET_free (argv); 127 GNUNET_free (argv);
128 GNUNET_free (binary_path);
105 return proc; 129 return proc;
106} 130}
131
132/* end of do_start_process.c */