diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-03 21:26:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-03 21:26:40 +0000 |
commit | 721e49caeea6ba5073f8bc5c6c08359295c02bb5 (patch) | |
tree | e06e80ba90af91e9452a48a7a5782913199b4877 /src/dht/test_dht_api.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
original patch from Mantis 1614
Diffstat (limited to 'src/dht/test_dht_api.c')
-rw-r--r-- | src/dht/test_dht_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index 2145be843..5ef70407c 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c | |||
@@ -85,7 +85,7 @@ struct PeerContext | |||
85 | struct GNUNET_DHT_FindPeerHandle *find_peer_handle; | 85 | struct GNUNET_DHT_FindPeerHandle *find_peer_handle; |
86 | 86 | ||
87 | #if START_ARM | 87 | #if START_ARM |
88 | pid_t arm_pid; | 88 | GNUNET_OS_Process *arm_proc; |
89 | #endif | 89 | #endif |
90 | }; | 90 | }; |
91 | 91 | ||
@@ -121,9 +121,11 @@ static void | |||
121 | stop_arm (struct PeerContext *p) | 121 | stop_arm (struct PeerContext *p) |
122 | { | 122 | { |
123 | #if START_ARM | 123 | #if START_ARM |
124 | if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) | 124 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
125 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 125 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
126 | GNUNET_OS_process_wait (p->arm_pid); | 126 | GNUNET_OS_process_wait (p->arm_proc); |
127 | GNUNET_OS_process_close (p->arm_proc); | ||
128 | p->arm_proc = NULL; | ||
127 | #endif | 129 | #endif |
128 | GNUNET_CONFIGURATION_destroy (p->cfg); | 130 | GNUNET_CONFIGURATION_destroy (p->cfg); |
129 | } | 131 | } |
@@ -453,7 +455,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
453 | { | 455 | { |
454 | p->cfg = GNUNET_CONFIGURATION_create (); | 456 | p->cfg = GNUNET_CONFIGURATION_create (); |
455 | #if START_ARM | 457 | #if START_ARM |
456 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 458 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
457 | "gnunet-service-arm", | 459 | "gnunet-service-arm", |
458 | #if VERBOSE_ARM | 460 | #if VERBOSE_ARM |
459 | "-L", "DEBUG", | 461 | "-L", "DEBUG", |