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/peerinfo/perf_peerinfo_api.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
original patch from Mantis 1614
Diffstat (limited to 'src/peerinfo/perf_peerinfo_api.c')
-rwxr-xr-x | src/peerinfo/perf_peerinfo_api.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c index ea21b0fae..eea2eb973 100755 --- a/src/peerinfo/perf_peerinfo_api.c +++ b/src/peerinfo/perf_peerinfo_api.c | |||
@@ -166,11 +166,11 @@ check () | |||
166 | NULL | 166 | NULL |
167 | }; | 167 | }; |
168 | #if START_SERVICE | 168 | #if START_SERVICE |
169 | pid_t pid; | 169 | GNUNET_OS_Process *proc; |
170 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 170 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
171 | GNUNET_GETOPT_OPTION_END | 171 | GNUNET_GETOPT_OPTION_END |
172 | }; | 172 | }; |
173 | pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-peerinfo", | 173 | proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-peerinfo", |
174 | "gnunet-service-peerinfo", | 174 | "gnunet-service-peerinfo", |
175 | #if DEBUG_PEERINFO | 175 | #if DEBUG_PEERINFO |
176 | "-L", "DEBUG", | 176 | "-L", "DEBUG", |
@@ -185,12 +185,15 @@ check () | |||
185 | numpeers, | 185 | numpeers, |
186 | NUM_REQUESTS * NUM_REQUESTS / 2); | 186 | NUM_REQUESTS * NUM_REQUESTS / 2); |
187 | #if START_SERVICE | 187 | #if START_SERVICE |
188 | if (0 != PLIBC_KILL (pid, SIGTERM)) | 188 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) |
189 | { | 189 | { |
190 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 190 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
191 | ok = 1; | 191 | ok = 1; |
192 | } | 192 | } |
193 | GNUNET_OS_process_wait(pid); | 193 | GNUNET_OS_process_wait (proc); |
194 | GNUNET_OS_process_close (proc); | ||
195 | proc = NULL; | ||
196 | |||
194 | #endif | 197 | #endif |
195 | return ok; | 198 | return ok; |
196 | } | 199 | } |