diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2014-02-20 10:35:33 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2014-02-20 10:35:33 +0000 |
commit | 2a35e345a204cb357361406f28e07bf9076cb092 (patch) | |
tree | 8c51b5dae07a1f3a3a6a13ac6c623e0b0df2a070 /src/util/test_os_start_process.c | |
parent | a06237deeec4aed38b09f633d7ebbeabb7da4c03 (diff) | |
download | gnunet-2a35e345a204cb357361406f28e07bf9076cb092.tar.gz gnunet-2a35e345a204cb357361406f28e07bf9076cb092.zip |
Allow redirection of STDERR when starting processes.
Diffstat (limited to 'src/util/test_os_start_process.c')
-rw-r--r-- | src/util/test_os_start_process.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 90d8ae101..e76ec5bcf 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -135,7 +135,8 @@ run_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
135 | 135 | ||
136 | proc = | 136 | proc = |
137 | GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ERR, | 137 | GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ERR, |
138 | hello_pipe_stdin, hello_pipe_stdout, fn, | 138 | hello_pipe_stdin, hello_pipe_stdout, NULL, |
139 | fn, | ||
139 | "test_gnunet_echo_hello", "-", NULL); | 140 | "test_gnunet_echo_hello", "-", NULL); |
140 | GNUNET_free (fn); | 141 | GNUNET_free (fn); |
141 | 142 | ||
@@ -203,7 +204,9 @@ check_kill () | |||
203 | } | 204 | } |
204 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 205 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
205 | proc = | 206 | proc = |
206 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn, | 207 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, |
208 | hello_pipe_stdin, hello_pipe_stdout, NULL, | ||
209 | fn, | ||
207 | "gnunet-service-resolver", "-", NULL); | 210 | "gnunet-service-resolver", "-", NULL); |
208 | sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ | 211 | sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ |
209 | GNUNET_free (fn); | 212 | GNUNET_free (fn); |
@@ -234,7 +237,9 @@ check_instant_kill () | |||
234 | } | 237 | } |
235 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 238 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
236 | proc = | 239 | proc = |
237 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn, | 240 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, |
241 | hello_pipe_stdin, hello_pipe_stdout, NULL, | ||
242 | fn, | ||
238 | "gnunet-service-resolver", "-", NULL); | 243 | "gnunet-service-resolver", "-", NULL); |
239 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) | 244 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
240 | { | 245 | { |