diff options
Diffstat (limited to 'src/arm/do_start_process.c')
-rw-r--r-- | src/arm/do_start_process.c | 28 |
1 files changed, 27 insertions, 1 deletions
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 */ | ||