|
|
|
@ -23,7 +23,6 @@ class MongooseHandler{
|
|
|
|
|
// = {"listening_ports", "8080", NULL};
|
|
|
|
|
//
|
|
|
|
|
struct mg_server * srv;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
@ -129,12 +128,8 @@ static void signalhandler(int signum){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void exithandlerfunc(){
|
|
|
|
|
std::cout << "alles hat ein ende" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
auto main(int argc, char **argv)->int
|
|
|
|
|
{
|
|
|
|
|
killme = false;
|
|
|
|
|
if ( !configfile_parsing_action(argc, argv) ) {
|
|
|
|
@ -145,7 +140,9 @@ int main(int argc, char **argv)
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
dump_args();
|
|
|
|
|
if (std::atexit(&exithandlerfunc))
|
|
|
|
|
if (std::atexit(
|
|
|
|
|
[](){std::cout << "alles hat ein ende" << std::endl;}
|
|
|
|
|
))
|
|
|
|
|
exit(-4);
|
|
|
|
|
#endif
|
|
|
|
|
struct sigaction sa;
|
|
|
|
@ -165,12 +162,8 @@ int main(int argc, char **argv)
|
|
|
|
|
std::cerr << "json_path: "<< merouterin->get_json_path() << "\n";
|
|
|
|
|
std::cerr << "file_path: "<< merouterin->get_file_path() << "\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MongooseHandler *m = new MongooseHandler(args_info.port_arg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!args_info.daemonize_flag) {
|
|
|
|
|
while((not killme))
|
|
|
|
|
m->serveloop(1000);
|
|
|
|
|