diff options
Diffstat (limited to 'src/statistics/test_statistics_api_loop.c')
-rw-r--r-- | src/statistics/test_statistics_api_loop.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c index 289e8f09f..b4e7ae7ab 100644 --- a/src/statistics/test_statistics_api_loop.c +++ b/src/statistics/test_statistics_api_loop.c | |||
@@ -96,8 +96,8 @@ check () | |||
96 | GNUNET_GETOPT_OPTION_END | 96 | GNUNET_GETOPT_OPTION_END |
97 | }; | 97 | }; |
98 | #if START_SERVICE | 98 | #if START_SERVICE |
99 | pid_t pid; | 99 | GNUNET_OS_Process *proc; |
100 | pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics", | 100 | proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics", |
101 | "gnunet-service-statistics", | 101 | "gnunet-service-statistics", |
102 | #if DEBUG_STATISTICS | 102 | #if DEBUG_STATISTICS |
103 | "-L", "DEBUG", | 103 | "-L", "DEBUG", |
@@ -107,12 +107,14 @@ check () | |||
107 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", | 107 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", |
108 | options, &run, &ok); | 108 | options, &run, &ok); |
109 | #if START_SERVICE | 109 | #if START_SERVICE |
110 | if (0 != PLIBC_KILL (pid, SIGTERM)) | 110 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) |
111 | { | 111 | { |
112 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 112 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
113 | ok = 1; | 113 | ok = 1; |
114 | } | 114 | } |
115 | GNUNET_OS_process_wait(pid); | 115 | GNUNET_OS_process_wait (proc); |
116 | GNUNET_OS_process_close (proc); | ||
117 | proc = NULL; | ||
116 | #endif | 118 | #endif |
117 | return ok; | 119 | return ok; |
118 | } | 120 | } |