From 5d2e17869e4d989465d1d3f4c0717745466b52a2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Jul 2012 15:15:19 +0000 Subject: [PATCH] -fixes --- src/gns/test_gns_proxy.c | 15 ++++++++++++--- src/util/test_configuration.c | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 96fe35ede..4cd0a3714 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c @@ -135,10 +135,19 @@ do_shutdown () GNUNET_free_non_null (url); if (NULL != tmp_cfgfile) - remove (tmp_cfgfile); - + { + if (0 != remove (tmp_cfgfile)) + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "remove", tmp_cfgfile); + GNUNET_free (tmp_cfgfile); + tmp_cfgfile = NULL; + } if (NULL != proxy_proc) - GNUNET_OS_process_kill (proxy_proc, 9); + { + (void) GNUNET_OS_process_kill (proxy_proc, SIGKILL); + GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proxy_proc)); + GNUNET_OS_process_destroy (proxy_proc); + proxy_proc = NULL; + } url = NULL; } diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 1242a5c8d..62ad5fa92 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c @@ -231,7 +231,8 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option) /* Compare the dumped configuration with modifications done */ cfg = GNUNET_CONFIGURATION_create (); GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_parse (cfg, diffsFileName)); - remove (diffsFileName); + if (0 != remove (diffsFileName)) + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "remove", diffsFileName); cbData.callBackOption = COMPARE; cbData.cfgDiffs = cfgDiffs; GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData); -- 2.25.1