diff options
Diffstat (limited to 'src/fs/test_fs_publish.c')
-rw-r--r-- | src/fs/test_fs_publish.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index b206fb415..dcce43cdf 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c | |||
@@ -195,14 +195,17 @@ static void | |||
195 | stop_arm (struct PeerContext *p) | 195 | stop_arm (struct PeerContext *p) |
196 | { | 196 | { |
197 | #if START_ARM | 197 | #if START_ARM |
198 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 198 | if (NULL != p->arm_proc) |
199 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 199 | { |
200 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) | 200 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
201 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 201 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
202 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 202 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
203 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); | 203 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
204 | GNUNET_OS_process_close (p->arm_proc); | 204 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
205 | p->arm_proc = NULL; | 205 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
206 | GNUNET_OS_process_close (p->arm_proc); | ||
207 | p->arm_proc = NULL; | ||
208 | } | ||
206 | #endif | 209 | #endif |
207 | GNUNET_CONFIGURATION_destroy (p->cfg); | 210 | GNUNET_CONFIGURATION_destroy (p->cfg); |
208 | } | 211 | } |