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_publish.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_publish.c')
-rw-r--r-- | src/fs/test_fs_publish.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index f5b835259..4e65e7590 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c | |||
@@ -53,7 +53,7 @@ struct PeerContext | |||
53 | { | 53 | { |
54 | struct GNUNET_CONFIGURATION_Handle *cfg; | 54 | struct GNUNET_CONFIGURATION_Handle *cfg; |
55 | #if START_ARM | 55 | #if START_ARM |
56 | pid_t arm_pid; | 56 | GNUNET_OS_Process *arm_proc; |
57 | #endif | 57 | #endif |
58 | }; | 58 | }; |
59 | 59 | ||
@@ -184,7 +184,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
184 | { | 184 | { |
185 | p->cfg = GNUNET_CONFIGURATION_create (); | 185 | p->cfg = GNUNET_CONFIGURATION_create (); |
186 | #if START_ARM | 186 | #if START_ARM |
187 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 187 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
188 | "gnunet-service-arm", | 188 | "gnunet-service-arm", |
189 | #if VERBOSE | 189 | #if VERBOSE |
190 | "-L", "DEBUG", | 190 | "-L", "DEBUG", |
@@ -199,12 +199,14 @@ static void | |||
199 | stop_arm (struct PeerContext *p) | 199 | stop_arm (struct PeerContext *p) |
200 | { | 200 | { |
201 | #if START_ARM | 201 | #if START_ARM |
202 | if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) | 202 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
203 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 203 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
204 | if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) | 204 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
205 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 205 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
206 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 206 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
207 | "ARM process %u stopped\n", p->arm_pid); | 207 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
208 | GNUNET_OS_process_close (p->arm_proc); | ||
209 | p->arm_proc = NULL; | ||
208 | #endif | 210 | #endif |
209 | GNUNET_CONFIGURATION_destroy (p->cfg); | 211 | GNUNET_CONFIGURATION_destroy (p->cfg); |
210 | } | 212 | } |