aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_os_start_process.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-07-09 19:04:19 +0000
committerChristian Grothoff <christian@grothoff.org>2012-07-09 19:04:19 +0000
commit8f9464256fc06a884bf589b4004262a0549d11b3 (patch)
treea088b8acbebdefe2acf0b41cfed4418830275b78 /src/util/test_os_start_process.c
parent817ee37a75fb8eb5887023d1a5152cb528ee2d5a (diff)
downloadgnunet-8f9464256fc06a884bf589b4004262a0549d11b3.tar.gz
gnunet-8f9464256fc06a884bf589b4004262a0549d11b3.zip
-LRN: Another take on std descriptor inheritance
Now descriptors are not inherited by default, you have to pass a set of flags to make it so. When pipes are given, flags have no effect. gnunet-arm now has two options to block stdout and stderr from being passed to gnunet-service-arm
Diffstat (limited to 'src/util/test_os_start_process.c')
-rw-r--r--src/util/test_os_start_process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c
index 3c30c75f3..e24e09500 100644
--- a/src/util/test_os_start_process.c
+++ b/src/util/test_os_start_process.c
@@ -131,7 +131,7 @@ run_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
131 } 131 }
132 132
133 proc = 133 proc =
134 GNUNET_OS_start_process (GNUNET_NO, hello_pipe_stdin, hello_pipe_stdout, fn, 134 GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn,
135 "test_gnunet_echo_hello", "-", NULL); 135 "test_gnunet_echo_hello", "-", NULL);
136 GNUNET_free (fn); 136 GNUNET_free (fn);
137 137
@@ -200,7 +200,7 @@ check_kill ()
200 return 1; 200 return 1;
201 } 201 }
202 proc = 202 proc =
203 GNUNET_OS_start_process (GNUNET_YES, hello_pipe_stdin, hello_pipe_stdout, fn, 203 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn,
204 "gnunet-service-resolver", "-", NULL); 204 "gnunet-service-resolver", "-", NULL);
205 sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ 205 sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */
206 if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) 206 if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
@@ -233,7 +233,7 @@ check_instant_kill ()
233 return 1; 233 return 1;
234 } 234 }
235 proc = 235 proc =
236 GNUNET_OS_start_process (GNUNET_YES, hello_pipe_stdin, hello_pipe_stdout, fn, 236 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn,
237 "gnunet-service-resolver", "-", NULL); 237 "gnunet-service-resolver", "-", NULL);
238 if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) 238 if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
239 { 239 {