#include <string.h>
#include <signal.h>
#include <unistd.h>
const char *config_filename = "./reread.conf";
void read_config(void)
{
};
};
char *buf = ""
" delay = 3\n" "# message = \"asdfasfasfd tersf\"\n" " argument one { value = 1 }\n" " argument two { value=foo}\n";
}
void sighandler(int sig)
{
read_config();
signal(SIGHUP, sighandler);
}
static int loop = 1;
void usr1handler(int sig)
{
loop = 0;
}
int main(void)
{
unsigned int i;
read_config();
signal(SIGHUP, sighandler);
signal(SIGUSR1, usr1handler);
while (loop) {
printf(
"Message: %s",
cfg_getstr(cfg,
"message"));
for (i = 0; i <
cfg_size(cfg,
"argument"); i++) {
}
printf("\n");
}
cfg = 0;
return 0;
}