diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-05-05 13:36:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-05-05 13:36:18 +0000 |
commit | a62cd21e71caa9c19078fa89364dc819536f6ffd (patch) | |
tree | cb88ac33fa986ca8f0bef59f00f5d991227f875e /src/fs/test_fs_unindex.c | |
parent | db90fb75efb404b6006a0e7cbf27f00fa931d860 (diff) |
check
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 99611a6c8f..6774d0dfa1 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c @@ -205,14 +205,17 @@ static void stop_arm (struct PeerContext *p) { #if START_ARM - if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) - GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); - if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) - GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); - GNUNET_OS_process_close (p->arm_proc); - p->arm_proc = NULL; + if (NULL != p->arm_proc) + { + if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) + GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); + if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) + GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); + GNUNET_OS_process_close (p->arm_proc); + p->arm_proc = NULL; + } #endif GNUNET_CONFIGURATION_destroy (p->cfg); } |