aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_publish_persistence.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-11-03 21:26:40 +0000
committerChristian Grothoff <christian@grothoff.org>2010-11-03 21:26:40 +0000
commit721e49caeea6ba5073f8bc5c6c08359295c02bb5 (patch)
treee06e80ba90af91e9452a48a7a5782913199b4877 /src/fs/test_fs_publish_persistence.c
parent37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff)
downloadgnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz
gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_publish_persistence.c')
-rw-r--r--src/fs/test_fs_publish_persistence.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c
index b4b9b58ba..afbee2ec8 100644
--- a/src/fs/test_fs_publish_persistence.c
+++ b/src/fs/test_fs_publish_persistence.c
@@ -52,7 +52,7 @@ struct PeerContext
52{ 52{
53 struct GNUNET_CONFIGURATION_Handle *cfg; 53 struct GNUNET_CONFIGURATION_Handle *cfg;
54#if START_ARM 54#if START_ARM
55 pid_t arm_pid; 55 GNUNET_OS_Process *arm_proc;
56#endif 56#endif
57}; 57};
58 58
@@ -243,7 +243,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
243{ 243{
244 p->cfg = GNUNET_CONFIGURATION_create (); 244 p->cfg = GNUNET_CONFIGURATION_create ();
245#if START_ARM 245#if START_ARM
246 p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", 246 p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
247 "gnunet-service-arm", 247 "gnunet-service-arm",
248#if VERBOSE 248#if VERBOSE
249 "-L", "DEBUG", 249 "-L", "DEBUG",
@@ -258,12 +258,14 @@ static void
258stop_arm (struct PeerContext *p) 258stop_arm (struct PeerContext *p)
259{ 259{
260#if START_ARM 260#if START_ARM
261 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) 261 if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
262 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 262 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
263 if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) 263 if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK)
264 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); 264 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
265 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 265 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
266 "ARM process %u stopped\n", p->arm_pid); 266 "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc));
267 GNUNET_OS_process_close (p->arm_proc);
268 p->arm_proc = NULL;
267#endif 269#endif
268 GNUNET_CONFIGURATION_destroy (p->cfg); 270 GNUNET_CONFIGURATION_destroy (p->cfg);
269} 271}