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/fs/test_fs_list_indexed.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_list_indexed.c')
-rw-r--r-- | src/fs/test_fs_list_indexed.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c index dd2b30417..1221ff6c4 100644 --- a/src/fs/test_fs_list_indexed.c +++ b/src/fs/test_fs_list_indexed.c | |||
@@ -56,7 +56,7 @@ struct PeerContext | |||
56 | { | 56 | { |
57 | struct GNUNET_CONFIGURATION_Handle *cfg; | 57 | struct GNUNET_CONFIGURATION_Handle *cfg; |
58 | #if START_ARM | 58 | #if START_ARM |
59 | pid_t arm_pid; | 59 | GNUNET_OS_Process *arm_proc; |
60 | #endif | 60 | #endif |
61 | }; | 61 | }; |
62 | 62 | ||
@@ -199,7 +199,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
199 | { | 199 | { |
200 | p->cfg = GNUNET_CONFIGURATION_create (); | 200 | p->cfg = GNUNET_CONFIGURATION_create (); |
201 | #if START_ARM | 201 | #if START_ARM |
202 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 202 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
203 | "gnunet-service-arm", | 203 | "gnunet-service-arm", |
204 | #if VERBOSE | 204 | #if VERBOSE |
205 | "-L", "DEBUG", | 205 | "-L", "DEBUG", |
@@ -214,12 +214,14 @@ static void | |||
214 | stop_arm (struct PeerContext *p) | 214 | stop_arm (struct PeerContext *p) |
215 | { | 215 | { |
216 | #if START_ARM | 216 | #if START_ARM |
217 | if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) | 217 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
218 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 218 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
219 | if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) | 219 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
220 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 220 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
221 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 221 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
222 | "ARM process %u stopped\n", p->arm_pid); | 222 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
223 | GNUNET_OS_process_close (p->arm_proc); | ||
224 | p->arm_proc = NULL; | ||
223 | #endif | 225 | #endif |
224 | GNUNET_CONFIGURATION_destroy (p->cfg); | 226 | GNUNET_CONFIGURATION_destroy (p->cfg); |
225 | } | 227 | } |