aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/test_statistics_api_loop.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/statistics/test_statistics_api_loop.c
parent37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff)
downloadgnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz
gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip
original patch from Mantis 1614
Diffstat (limited to 'src/statistics/test_statistics_api_loop.c')
-rw-r--r--src/statistics/test_statistics_api_loop.c10
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}