cpq ea89a4afab Revert "Integration page"
This reverts commit 3415b62d2d46bb2cf132c6495b387c03f910e434.
2023-07-19 18:50:27 +01:00

34 lines
633 B
C

// Copyright (c) 2020-2023 Cesanta Software Limited
// All rights reserved
#include "mongoose.h"
#include "net.h"
static int s_sig_num;
static void signal_handler(int sig_num) {
signal(sig_num, signal_handler);
s_sig_num = sig_num;
}
int main(void) {
struct mg_mgr mgr;
signal(SIGPIPE, SIG_IGN);
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);
srand(time(NULL));
mg_log_set(MG_LL_DEBUG); // Set debug log level
mg_mgr_init(&mgr);
web_init(&mgr);
while (s_sig_num == 0) {
mg_mgr_poll(&mgr, 50);
}
mg_mgr_free(&mgr);
MG_INFO(("Exiting on signal %d", s_sig_num));
return 0;
}