static void
run (void *cls,
- struct GNUNET_SCHEDULER_Handle *sched,
char *const *args,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
int i;
char name[128];
- h = GNUNET_STATISTICS_create (sched, "test-statistics-api-loop", cfg);
+ h = GNUNET_STATISTICS_create ("test-statistics-api-loop", cfg);
for (i=0;i<ROUNDS;i++)
{
GNUNET_snprintf (name, sizeof (name), "test-%d", i % 256);
GNUNET_GETOPT_OPTION_END
};
#if START_SERVICE
- pid_t pid;
- pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics",
+ struct GNUNET_OS_Process *proc;
+ proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics",
"gnunet-service-statistics",
#if DEBUG_STATISTICS
"-L", "DEBUG",
#endif
"-c", "test_statistics_api_data.conf", NULL);
#endif
+ GNUNET_assert (NULL != proc);
GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp",
options, &run, &ok);
#if START_SERVICE
- if (0 != PLIBC_KILL (pid, SIGTERM))
+ if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
ok = 1;
}
- GNUNET_OS_process_wait(pid);
+ GNUNET_OS_process_wait (proc);
+ GNUNET_OS_process_close (proc);
+ proc = NULL;
#endif
return ok;
}