Commit 1bcafc95 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(exit): catching SIGTERM

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent 27e6e4b4
...@@ -104,11 +104,8 @@ int main(int argc, char** argv) { ...@@ -104,11 +104,8 @@ int main(int argc, char** argv) {
Logger::init("smf", Options::getlogStdout(), Options::getlogRotFilelog()); Logger::init("smf", Options::getlogStdout(), Options::getlogRotFilelog());
Logger::smf_app().startup("Options parsed"); Logger::smf_app().startup("Options parsed");
struct sigaction sigIntHandler; std::signal(SIGTERM, my_app_signal_handler);
sigIntHandler.sa_handler = my_app_signal_handler; std::signal(SIGINT, my_app_signal_handler);
sigemptyset(&sigIntHandler.sa_mask);
sigIntHandler.sa_flags = 0;
sigaction(SIGINT, &sigIntHandler, NULL);
// Config // Config
smf_cfg.load(Options::getlibconfigConfig()); smf_cfg.load(Options::getlibconfigConfig());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment