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_unindex_persistence.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_unindex_persistence.c')
-rw-r--r-- | src/fs/test_fs_unindex_persistence.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index cbe08913f..d33ecb5fc 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c | |||
@@ -51,7 +51,7 @@ struct PeerContext | |||
51 | { | 51 | { |
52 | struct GNUNET_CONFIGURATION_Handle *cfg; | 52 | struct GNUNET_CONFIGURATION_Handle *cfg; |
53 | #if START_ARM | 53 | #if START_ARM |
54 | pid_t arm_pid; | 54 | GNUNET_OS_Process *arm_proc; |
55 | #endif | 55 | #endif |
56 | }; | 56 | }; |
57 | 57 | ||
@@ -266,7 +266,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
266 | { | 266 | { |
267 | p->cfg = GNUNET_CONFIGURATION_create (); | 267 | p->cfg = GNUNET_CONFIGURATION_create (); |
268 | #if START_ARM | 268 | #if START_ARM |
269 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 269 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
270 | "gnunet-service-arm", | 270 | "gnunet-service-arm", |
271 | #if VERBOSE | 271 | #if VERBOSE |
272 | "-L", "DEBUG", | 272 | "-L", "DEBUG", |
@@ -281,12 +281,14 @@ static void | |||
281 | stop_arm (struct PeerContext *p) | 281 | stop_arm (struct PeerContext *p) |
282 | { | 282 | { |
283 | #if START_ARM | 283 | #if START_ARM |
284 | if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) | 284 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
285 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 285 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
286 | if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) | 286 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
287 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 287 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
288 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 288 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
289 | "ARM process %u stopped\n", p->arm_pid); | 289 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
290 | GNUNET_OS_process_close (p->arm_proc); | ||
291 | p->arm_proc = NULL; | ||
290 | #endif | 292 | #endif |
291 | GNUNET_CONFIGURATION_destroy (p->cfg); | 293 | GNUNET_CONFIGURATION_destroy (p->cfg); |
292 | } | 294 | } |