aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-02-15 09:47:43 +0000
committerLRN <lrn1986@gmail.com>2013-02-15 09:47:43 +0000
commitb0507e2831e5144bc5c8e8fc2554ce7c30f83897 (patch)
tree634b8fcf3fdce5f2204504a8e990b1ee2e10e949 /src/util
parente5291f9c14cc4720faf033dbea5e9549f5fb9f11 (diff)
downloadgnunet-b0507e2831e5144bc5c8e8fc2554ce7c30f83897.tar.gz
gnunet-b0507e2831e5144bc5c8e8fc2554ce7c30f83897.zip
Another highly temporary fix to make os_start_process pass
Diffstat (limited to 'src/util')
-rw-r--r--src/util/test_os_start_process.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c
index fc548e881..0f225bcec 100644
--- a/src/util/test_os_start_process.c
+++ b/src/util/test_os_start_process.c
@@ -188,20 +188,16 @@ static int
188check_kill () 188check_kill ()
189{ 189{
190 char *fn; 190 char *fn;
191#if !WINDOWS 191
192 GNUNET_asprintf (&fn, "cat");
193#else
194 GNUNET_asprintf (&fn, "w32cat");
195#endif
196 hello_pipe_stdin = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO); 192 hello_pipe_stdin = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO);
197 hello_pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); 193 hello_pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES);
198 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL)) 194 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL))
199 { 195 {
200 GNUNET_free (fn);
201 return 1; 196 return 1;
202 } 197 }
198 fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
203 proc = 199 proc =
204 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, "gnunet-service-resolver", 200 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn,
205 "gnunet-service-resolver", "-", NULL); 201 "gnunet-service-resolver", "-", NULL);
206 sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ 202 sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */
207 GNUNET_free (fn); 203 GNUNET_free (fn);
@@ -223,20 +219,16 @@ static int
223check_instant_kill () 219check_instant_kill ()
224{ 220{
225 char *fn; 221 char *fn;
226#if !WINDOWS 222
227 GNUNET_asprintf (&fn, "cat");
228#else
229 GNUNET_asprintf (&fn, "w32cat");
230#endif
231 hello_pipe_stdin = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO); 223 hello_pipe_stdin = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO);
232 hello_pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); 224 hello_pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES);
233 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL)) 225 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL))
234 { 226 {
235 GNUNET_free (fn);
236 return 1; 227 return 1;
237 } 228 }
229 fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
238 proc = 230 proc =
239 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, "gnunet-service-resolver", 231 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn,
240 "gnunet-service-resolver", "-", NULL); 232 "gnunet-service-resolver", "-", NULL);
241 if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) 233 if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
242 { 234 {