aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-helper-testbed.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/gnunet-helper-testbed.c')
-rw-r--r--src/testbed/gnunet-helper-testbed.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c
index 95c54d06d..f49789a80 100644
--- a/src/testbed/gnunet-helper-testbed.c
+++ b/src/testbed/gnunet-helper-testbed.c
@@ -24,8 +24,8 @@
24 * gnunet-service-testbed. This binary also receives configuration 24 * gnunet-service-testbed. This binary also receives configuration
25 * from the remove controller which is put in a temporary location 25 * from the remove controller which is put in a temporary location
26 * with ports and paths fixed so that gnunet-service-testbed runs 26 * with ports and paths fixed so that gnunet-service-testbed runs
27 * without any hurdles. 27 * without any hurdles.
28 * 28 *
29 * This helper monitors for three termination events. They are: (1)The 29 * This helper monitors for three termination events. They are: (1)The
30 * stdin of the helper is closed for reading; (2)the helper received 30 * stdin of the helper is closed for reading; (2)the helper received
31 * SIGTERM/SIGINT; (3)the testbed crashed. In case of events 1 and 2 31 * SIGTERM/SIGINT; (3)the testbed crashed. In case of events 1 and 2
@@ -161,13 +161,13 @@ static int status;
161static void 161static void
162shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 162shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
163{ 163{
164 LOG_DEBUG ("Shutting down\n"); 164 LOG_DEBUG ("Shutting down\n");
165 shutdown_task_id = GNUNET_SCHEDULER_NO_TASK; 165 shutdown_task_id = GNUNET_SCHEDULER_NO_TASK;
166 if (NULL != testbed) 166 if (NULL != testbed)
167 { 167 {
168 LOG_DEBUG ("Killing testbed\n"); 168 LOG_DEBUG ("Killing testbed\n");
169 GNUNET_break (0 == GNUNET_OS_process_kill (testbed, SIGTERM)); 169 GNUNET_break (0 == GNUNET_OS_process_kill (testbed, SIGTERM));
170 } 170 }
171 if (GNUNET_SCHEDULER_NO_TASK != read_task_id) 171 if (GNUNET_SCHEDULER_NO_TASK != read_task_id)
172 { 172 {
173 GNUNET_SCHEDULER_cancel (read_task_id); 173 GNUNET_SCHEDULER_cancel (read_task_id);
@@ -194,7 +194,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
194 GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (testbed)); 194 GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (testbed));
195 GNUNET_OS_process_destroy (testbed); 195 GNUNET_OS_process_destroy (testbed);
196 testbed = NULL; 196 testbed = NULL;
197 } 197 }
198 if (NULL != test_system) 198 if (NULL != test_system)
199 { 199 {
200 GNUNET_TESTING_system_destroy (test_system, GNUNET_YES); 200 GNUNET_TESTING_system_destroy (test_system, GNUNET_YES);
@@ -291,7 +291,7 @@ child_death_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
291 GNUNET_break (0); 291 GNUNET_break (0);
292 return; 292 return;
293 } 293 }
294 GNUNET_break (GNUNET_SYSERR != 294 GNUNET_break (GNUNET_SYSERR !=
295 (ret = GNUNET_OS_process_status (testbed, &type, &code))); 295 (ret = GNUNET_OS_process_status (testbed, &type, &code)));
296 if (GNUNET_NO != ret) 296 if (GNUNET_NO != ret)
297 { 297 {
@@ -456,7 +456,7 @@ tokenizer_cb (void *cls, void *client,
456 wc->data = reply; 456 wc->data = reply;
457 write_task_id = 457 write_task_id =
458 GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, stdout_fd, 458 GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, stdout_fd,
459 &write_task, wc); 459 &write_task, wc);
460 child_death_task_id = 460 child_death_task_id =
461 GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, 461 GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
462 GNUNET_DISK_pipe_handle (sigpipe, 462 GNUNET_DISK_pipe_handle (sigpipe,
@@ -534,7 +534,7 @@ run (void *cls, char *const *args, const char *cfgfile,
534 read_task_id = 534 read_task_id =
535 GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, stdin_fd, 535 GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, stdin_fd,
536 &read_task, NULL); 536 &read_task, NULL);
537 shutdown_task_id = 537 shutdown_task_id =
538 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 538 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
539 NULL); 539 NULL);
540} 540}
@@ -576,7 +576,7 @@ main (int argc, char **argv)
576 int ret; 576 int ret;
577 577
578 status = GNUNET_OK; 578 status = GNUNET_OK;
579 if (NULL == (sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, 579 if (NULL == (sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO,
580 GNUNET_NO, GNUNET_NO))) 580 GNUNET_NO, GNUNET_NO)))
581 { 581 {
582 GNUNET_break (0); 582 GNUNET_break (0);