aboutsummaryrefslogtreecommitdiff
path: root/src/arm/do_start_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arm/do_start_process.c')
-rw-r--r--src/arm/do_start_process.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arm/do_start_process.c b/src/arm/do_start_process.c
index 357d39920..d616ac2b7 100644
--- a/src/arm/do_start_process.c
+++ b/src/arm/do_start_process.c
@@ -7,12 +7,14 @@
7 * limitation that it does NOT allow passing command line arguments 7 * limitation that it does NOT allow passing command line arguments
8 * with spaces to the new process. 8 * with spaces to the new process.
9 * 9 *
10 * @param lsocks array of listen sockets to dup starting at fd3 (systemd-style), or NULL
10 * @param first_arg first argument for argv (may be an empty string) 11 * @param first_arg first argument for argv (may be an empty string)
11 * @param ... more arguments, NULL terminated 12 * @param ... more arguments, NULL terminated
12 * @return PID of the started process, -1 on error 13 * @return PID of the started process, -1 on error
13 */ 14 */
14static pid_t 15static pid_t
15do_start_process (const char *first_arg, ...) 16do_start_process (const int *lsocks,
17 const char *first_arg, ...)
16{ 18{
17 va_list ap; 19 va_list ap;
18 char **argv; 20 char **argv;
@@ -86,7 +88,7 @@ do_start_process (const char *first_arg, ...)
86 while (NULL != (arg = (va_arg (ap, const char*)))); 88 while (NULL != (arg = (va_arg (ap, const char*))));
87 va_end (ap); 89 va_end (ap);
88 argv[argv_size] = NULL; 90 argv[argv_size] = NULL;
89 pid = GNUNET_OS_start_process_v (argv[0], argv); 91 pid = GNUNET_OS_start_process_v (lsocks, argv[0], argv);
90 while (argv_size > 0) 92 while (argv_size > 0)
91 GNUNET_free (argv[--argv_size]); 93 GNUNET_free (argv[--argv_size]);
92 GNUNET_free (argv); 94 GNUNET_free (argv);