diff options
Diffstat (limited to 'src/fs/test_fs_start_stop.c')
-rw-r--r-- | src/fs/test_fs_start_stop.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/fs/test_fs_start_stop.c b/src/fs/test_fs_start_stop.c index efc744080..5080ecc18 100644 --- a/src/fs/test_fs_start_stop.c +++ b/src/fs/test_fs_start_stop.c | |||
@@ -72,14 +72,17 @@ static void | |||
72 | stop_arm (struct PeerContext *p) | 72 | stop_arm (struct PeerContext *p) |
73 | { | 73 | { |
74 | #if START_ARM | 74 | #if START_ARM |
75 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 75 | if (NULL != p->arm_proc) |
76 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 76 | { |
77 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) | 77 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
78 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 78 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
79 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 79 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
80 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); | 80 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
81 | GNUNET_OS_process_close (p->arm_proc); | 81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
82 | p->arm_proc = NULL; | 82 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
83 | GNUNET_OS_process_close (p->arm_proc); | ||
84 | p->arm_proc = NULL; | ||
85 | } | ||
83 | #endif | 86 | #endif |
84 | GNUNET_CONFIGURATION_destroy (p->cfg); | 87 | GNUNET_CONFIGURATION_destroy (p->cfg); |
85 | } | 88 | } |