#include <stdio.h>
#include <confuse.h>
#include <server.h>
static long int sleep_duration;
static int sleep_construct()
{
fprintf(stderr, "sleep_construct\n");
return 1;
}
static int sleep_prestart(cfg_t *configuration)
{
fprintf(stderr, "sleep_prestart\n");
return 1;
}
static void * sleep_operator(void *foobar)
{
fprintf(stderr, "sleep_operator\n");
for(;;) sleep(sleep_duration);
return NULL;
}
static void sleep_report(FILE *where)
{
fprintf(stderr, "sleep_report\n");
}
static cfg_opt_t sleep_config[] = {
CFG_SIMPLE_INT("sleep_duration", &sleep_duration),
CFG_END()
};
static char *sleep_authors[] = {"Vito Caputo <vcaputo@pengaru.com>", NULL};
SERVER_MODULE(sleep, 0, 0, 1, "Example module that does nothing but sleep");