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