From 721e49caeea6ba5073f8bc5c6c08359295c02bb5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 3 Nov 2010 21:26:40 +0000 Subject: original patch from Mantis 1614 --- src/transport/test_quota_compliance.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/transport/test_quota_compliance.c') diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index 4c4a025f2..39319f8d7 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c @@ -65,7 +65,7 @@ struct PeerContext struct GNUNET_TRANSPORT_Handle *th; struct GNUNET_PeerIdentity id; #if START_ARM - pid_t arm_pid; + GNUNET_OS_Process *arm_proc; #endif }; @@ -197,9 +197,11 @@ static void stop_arm (struct PeerContext *p) { #if START_ARM - if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) + if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); - GNUNET_OS_process_wait (p->arm_pid); + GNUNET_OS_process_wait (p->arm_proc); + GNUNET_OS_process_close (p->arm_proc); + p->arm_proc = NULL; #endif GNUNET_CONFIGURATION_destroy (p->cfg); } @@ -576,7 +578,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) { p->cfg = GNUNET_CONFIGURATION_create (); #if START_ARM - p->arm_pid = GNUNET_OS_start_process (NULL, NULL, + p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", "gnunet-service-arm", #if VERBOSE_ARM -- cgit v1.2.3