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_namespace_list_updateable.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_namespace_list_updateable.c')
-rw-r--r-- | src/fs/test_fs_namespace_list_updateable.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fs/test_fs_namespace_list_updateable.c b/src/fs/test_fs_namespace_list_updateable.c index fc6b1537a..1cf8653bb 100644 --- a/src/fs/test_fs_namespace_list_updateable.c +++ b/src/fs/test_fs_namespace_list_updateable.c | |||
@@ -55,7 +55,7 @@ struct PeerContext | |||
55 | { | 55 | { |
56 | struct GNUNET_CONFIGURATION_Handle *cfg; | 56 | struct GNUNET_CONFIGURATION_Handle *cfg; |
57 | #if START_ARM | 57 | #if START_ARM |
58 | pid_t arm_pid; | 58 | GNUNET_OS_Process *arm_proc; |
59 | #endif | 59 | #endif |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -73,7 +73,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
73 | { | 73 | { |
74 | p->cfg = GNUNET_CONFIGURATION_create (); | 74 | p->cfg = GNUNET_CONFIGURATION_create (); |
75 | #if START_ARM | 75 | #if START_ARM |
76 | p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 76 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
77 | "gnunet-service-arm", | 77 | "gnunet-service-arm", |
78 | #if VERBOSE | 78 | #if VERBOSE |
79 | "-L", "DEBUG", | 79 | "-L", "DEBUG", |
@@ -88,12 +88,14 @@ static void | |||
88 | stop_arm (struct PeerContext *p) | 88 | stop_arm (struct PeerContext *p) |
89 | { | 89 | { |
90 | #if START_ARM | 90 | #if START_ARM |
91 | if (0 != PLIBC_KILL (p->arm_pid, SIGTERM)) | 91 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
92 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 92 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
93 | if (GNUNET_OS_process_wait(p->arm_pid) != GNUNET_OK) | 93 | if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK) |
94 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 94 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
95 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 95 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
96 | "ARM process %u stopped\n", p->arm_pid); | 96 | "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc)); |
97 | GNUNET_OS_process_close (p->arm_proc); | ||
98 | p->arm_proc = NULL; | ||
97 | #endif | 99 | #endif |
98 | if (uri_this != NULL) | 100 | if (uri_this != NULL) |
99 | GNUNET_FS_uri_destroy (uri_this); | 101 | GNUNET_FS_uri_destroy (uri_this); |