aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_namespace.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_namespace.c
parent37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff)
downloadgnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz
gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_namespace.c')
-rw-r--r--src/fs/test_fs_namespace.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index f197b4749..efe44af0b 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -59,7 +59,7 @@ struct PeerContext
59{ 59{
60 struct GNUNET_CONFIGURATION_Handle *cfg; 60 struct GNUNET_CONFIGURATION_Handle *cfg;
61#if START_ARM 61#if START_ARM
62 pid_t arm_pid; 62 GNUNET_OS_Process *arm_proc;
63#endif 63#endif
64}; 64};
65 65
@@ -69,7 +69,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
69{ 69{
70 p->cfg = GNUNET_CONFIGURATION_create (); 70 p->cfg = GNUNET_CONFIGURATION_create ();
71#if START_ARM 71#if START_ARM
72 p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", 72 p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
73 "gnunet-service-arm", 73 "gnunet-service-arm",
74#if VERBOSE 74#if VERBOSE
75 "-L", "DEBUG", 75 "-L", "DEBUG",
@@ -84,12 +84,14 @@ static void
84stop_arm (struct PeerContext *p) 84stop_arm (struct PeerContext *p)
85{ 85{
86#if START_ARM 86#if START_ARM
87 if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) 87 if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
88 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 88 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
89 if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) 89 if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK)
90 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); 90 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
91 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 91 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
92 "ARM process %u stopped\n", p->arm_pid); 92 "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc));
93 GNUNET_OS_process_close (p->arm_proc);
94 p->arm_proc = NULL;
93#endif 95#endif
94 GNUNET_CONFIGURATION_destroy (p->cfg); 96 GNUNET_CONFIGURATION_destroy (p->cfg);
95} 97}