diff options
Diffstat (limited to 'src/fs/test_fs_unindex_persistence.c')
-rw-r--r-- | src/fs/test_fs_unindex_persistence.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index ee4a4c2db..095c6961f 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c | |||
@@ -273,14 +273,17 @@ static void | |||
273 | stop_arm (struct PeerContext *p) | 273 | stop_arm (struct PeerContext *p) |
274 | { | 274 | { |
275 | #if START_ARM | 275 | #if START_ARM |
276 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 276 | if (NULL != p->arm_proc) |
277 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 277 | { |
278 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) | 278 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
279 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 279 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 280 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
281 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); | 281 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
282 | GNUNET_OS_process_close (p->arm_proc); | 282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
283 | p->arm_proc = NULL; | 283 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
284 | GNUNET_OS_process_close (p->arm_proc); | ||
285 | p->arm_proc = NULL; | ||
286 | } | ||
284 | #endif | 287 | #endif |
285 | GNUNET_CONFIGURATION_destroy (p->cfg); | 288 | GNUNET_CONFIGURATION_destroy (p->cfg); |
286 | } | 289 | } |