diff options
Diffstat (limited to 'src/testbed/gnunet_testbed_mpi_spawn.c')
-rw-r--r-- | src/testbed/gnunet_testbed_mpi_spawn.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testbed/gnunet_testbed_mpi_spawn.c b/src/testbed/gnunet_testbed_mpi_spawn.c index c7b7aab0b..a7652cfd8 100644 --- a/src/testbed/gnunet_testbed_mpi_spawn.c +++ b/src/testbed/gnunet_testbed_mpi_spawn.c | |||
@@ -26,7 +26,7 @@ static int ret; | |||
26 | static struct GNUNET_OS_Process *child; | 26 | static struct GNUNET_OS_Process *child; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * The arguments including the binary to spawn | 29 | * The arguments including the binary to spawn |
30 | */ | 30 | */ |
31 | static char **argv2; | 31 | static char **argv2; |
32 | 32 | ||
@@ -79,7 +79,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
79 | shutdown_task_id = GNUNET_SCHEDULER_NO_TASK; | 79 | shutdown_task_id = GNUNET_SCHEDULER_NO_TASK; |
80 | if (0 != child_exit_code) | 80 | if (0 != child_exit_code) |
81 | { | 81 | { |
82 | LOG (GNUNET_ERROR_TYPE_WARNING, "Child exited with error code: %lu\n", | 82 | LOG (GNUNET_ERROR_TYPE_WARNING, "Child exited with error code: %lu\n", |
83 | child_exit_code); | 83 | child_exit_code); |
84 | ret = 128 + (int) child_exit_code; | 84 | ret = 128 + (int) child_exit_code; |
85 | } | 85 | } |
@@ -101,7 +101,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
101 | static int hard_kill; | 101 | static int hard_kill; |
102 | 102 | ||
103 | GNUNET_assert (NULL != child); | 103 | GNUNET_assert (NULL != child); |
104 | terminate_task_id = | 104 | terminate_task_id = |
105 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 105 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
106 | &terminate_task, NULL); | 106 | &terminate_task, NULL); |
107 | if (0 != hard_kill) | 107 | if (0 != hard_kill) |
@@ -110,7 +110,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
110 | { | 110 | { |
111 | case 1: | 111 | case 1: |
112 | case 2: | 112 | case 2: |
113 | LOG (GNUNET_ERROR_TYPE_WARNING, | 113 | LOG (GNUNET_ERROR_TYPE_WARNING, |
114 | "%d more interrupts needed to send SIGKILL to the child\n", | 114 | "%d more interrupts needed to send SIGKILL to the child\n", |
115 | 3 - hard_kill); | 115 | 3 - hard_kill); |
116 | hard_kill++; | 116 | hard_kill++; |
@@ -190,7 +190,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
190 | char *hostname; | 190 | char *hostname; |
191 | size_t hostname_len; | 191 | size_t hostname_len; |
192 | unsigned int nhosts; | 192 | unsigned int nhosts; |
193 | 193 | ||
194 | null_cfg = GNUNET_CONFIGURATION_create (); | 194 | null_cfg = GNUNET_CONFIGURATION_create (); |
195 | nhosts = GNUNET_TESTBED_hosts_load_from_loadleveler (null_cfg, &hosts); | 195 | nhosts = GNUNET_TESTBED_hosts_load_from_loadleveler (null_cfg, &hosts); |
196 | if (0 == nhosts) | 196 | if (0 == nhosts) |
@@ -223,7 +223,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
223 | if (NULL == tmpdir) | 223 | if (NULL == tmpdir) |
224 | tmpdir = getenv ("TMP"); | 224 | tmpdir = getenv ("TMP"); |
225 | if (NULL == tmpdir) | 225 | if (NULL == tmpdir) |
226 | tmpdir = getenv ("TEMP"); | 226 | tmpdir = getenv ("TEMP"); |
227 | if (NULL == tmpdir) | 227 | if (NULL == tmpdir) |
228 | tmpdir = "/tmp"; | 228 | tmpdir = "/tmp"; |
229 | (void) GNUNET_asprintf (&fn, "%s/gnunet-testbed-spawn.lock", tmpdir); | 229 | (void) GNUNET_asprintf (&fn, "%s/gnunet-testbed-spawn.lock", tmpdir); |
@@ -304,7 +304,7 @@ main (int argc, char *argv[]) | |||
304 | GNUNET_break (0); | 304 | GNUNET_break (0); |
305 | return 1; | 305 | return 1; |
306 | } | 306 | } |
307 | if (NULL == (sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, | 307 | if (NULL == (sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, |
308 | GNUNET_NO, GNUNET_NO))) | 308 | GNUNET_NO, GNUNET_NO))) |
309 | { | 309 | { |
310 | GNUNET_break (0); | 310 | GNUNET_break (0); |
@@ -321,7 +321,7 @@ main (int argc, char *argv[]) | |||
321 | argv2 = GNUNET_malloc (sizeof (char *) * argc); | 321 | argv2 = GNUNET_malloc (sizeof (char *) * argc); |
322 | for (cnt = 1; cnt < argc; cnt++) | 322 | for (cnt = 1; cnt < argc; cnt++) |
323 | argv2[cnt - 1] = argv[cnt]; | 323 | argv2[cnt - 1] = argv[cnt]; |
324 | GNUNET_SCHEDULER_run (run, NULL); | 324 | GNUNET_SCHEDULER_run (run, NULL); |
325 | GNUNET_free (argv2); | 325 | GNUNET_free (argv2); |
326 | GNUNET_SIGNAL_handler_uninstall (shc_chld); | 326 | GNUNET_SIGNAL_handler_uninstall (shc_chld); |
327 | shc_chld = NULL; | 327 | shc_chld = NULL; |