-fixes
authorChristian Grothoff <christian@grothoff.org>
Wed, 25 Jul 2012 15:15:19 +0000 (15:15 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 25 Jul 2012 15:15:19 +0000 (15:15 +0000)
src/gns/test_gns_proxy.c
src/util/test_configuration.c

index 96fe35edefc6cb75f7fb2b5ee3a9dfa0fee18b3b..4cd0a371499ed96e16343b405081e2ef850ab308 100644 (file)
@@ -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;
 }
 
index 1242a5c8d5b70321fd83d304862819655bd7f5d5..62ad5fa92fc3a4a267b834b719d9307675fad1bc 100644 (file)
@@ -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);