aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_os_start_process.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-17 18:10:06 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-17 18:10:06 +0000
commit3b8e7c3fdac1928d38432af7bb58393443828771 (patch)
tree89b77005da1f8986a0c535c92c2dc6023941eff3 /src/util/test_os_start_process.c
parent3f266fd9a32cc53a3c3d102ca2891ce62da3755b (diff)
downloadgnunet-3b8e7c3fdac1928d38432af7bb58393443828771.tar.gz
gnunet-3b8e7c3fdac1928d38432af7bb58393443828771.zip
fix
Diffstat (limited to 'src/util/test_os_start_process.c')
-rw-r--r--src/util/test_os_start_process.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c
index 3803259f9..421bd7e0f 100644
--- a/src/util/test_os_start_process.c
+++ b/src/util/test_os_start_process.c
@@ -33,7 +33,7 @@
33#include "gnunet_scheduler_lib.h" 33#include "gnunet_scheduler_lib.h"
34#include "disk.h" 34#include "disk.h"
35 35
36#define VERBOSE GNUNET_YES 36#define VERBOSE GNUNET_NO
37 37
38static char *test_phrase = "HELLO WORLD"; 38static char *test_phrase = "HELLO WORLD";
39static int ok; 39static int ok;
@@ -74,6 +74,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
74 74
75 if (bytes < 1) 75 if (bytes < 1)
76 { 76 {
77 GNUNET_break (0);
77 ok = 1; 78 ok = 1;
78 GNUNET_SCHEDULER_cancel(tc->sched, die_task); 79 GNUNET_SCHEDULER_cancel(tc->sched, die_task);
79 GNUNET_SCHEDULER_add_now(tc->sched, &end_task, NULL); 80 GNUNET_SCHEDULER_add_now(tc->sched, &end_task, NULL);
@@ -112,6 +113,7 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
112 113
113 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL)) 114 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL))
114 { 115 {
116 GNUNET_break (0);
115 ok = 1; 117 ok = 1;
116 GNUNET_free (fn); 118 GNUNET_free (fn);
117 return; 119 return;
@@ -129,8 +131,9 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
129 wh = GNUNET_DISK_pipe_handle (hello_pipe_stdin, GNUNET_DISK_PIPE_END_WRITE); 131 wh = GNUNET_DISK_pipe_handle (hello_pipe_stdin, GNUNET_DISK_PIPE_END_WRITE);
130 132
131 /* Write the test_phrase to the cat process */ 133 /* Write the test_phrase to the cat process */
132 if (GNUNET_DISK_file_write(wh, test_phrase, strlen(test_phrase) + 1) != GNUNET_YES) 134 if (GNUNET_DISK_file_write(wh, test_phrase, strlen(test_phrase) + 1) != strlen(test_phrase) + 1)
133 { 135 {
136 GNUNET_break (0);
134 ok = 1; 137 ok = 1;
135 return; 138 return;
136 } 139 }