diff options
Diffstat (limited to 'src/fs/test_fs_unindex.c')
-rw-r--r-- | src/fs/test_fs_unindex.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index 99611a6c8..6774d0dfa 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c | |||
@@ -205,14 +205,17 @@ static void | |||
205 | stop_arm (struct PeerContext *p) | 205 | stop_arm (struct PeerContext *p) |
206 | { | 206 | { |
207 | #if START_ARM | 207 | #if START_ARM |
208 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 208 | if (NULL != p->arm_proc) |
209 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 209 | { |
210 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) | 210 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
211 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 211 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
212 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 212 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
213 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); | 213 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
214 | GNUNET_OS_process_close (p->arm_proc); | 214 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
215 | p->arm_proc = NULL; | 215 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
216 | GNUNET_OS_process_close (p->arm_proc); | ||
217 | p->arm_proc = NULL; | ||
218 | } | ||
216 | #endif | 219 | #endif |
217 | GNUNET_CONFIGURATION_destroy (p->cfg); | 220 | GNUNET_CONFIGURATION_destroy (p->cfg); |
218 | } | 221 | } |