#include <stdio.h>
#include <stddef.h>
#include <signal.h>
#include "stellar/stellar.h"
#include "stellar_core.h"
struct stellar *st = NULL;
static void signal_handler(int signo)
{
if (signo == SIGINT)
printf("SIGINT received, notify threads to exit\n");
stellar_loopbreak(st);
}
if (signo == SIGQUIT)
printf("SIGQUIT received, notify threads to exit\n");
if (signo == SIGTERM)
printf("SIGTERM received, notify threads to exit\n");
if (signo == SIGHUP)
printf("SIGHUP received, reload log level\n");
stellar_reload_log_level(st);
int main(int argc __attribute__((__unused__)), char **argv __attribute__((__unused__)))
signal(SIGINT, signal_handler);
signal(SIGQUIT, signal_handler);
signal(SIGTERM, signal_handler);
signal(SIGHUP, signal_handler);
st = stellar_new("./conf/stellar.toml", "./plugin/spec.toml", "./conf/log.toml");
if (st == NULL)
return 0;
stellar_run(st);
stellar_free(st);