Add handling of SIGTERM

This commit is contained in:
Felix Racz 2022-01-09 01:25:45 +01:00
parent 77826c8691
commit 03e2a855b1

View File

@ -62,6 +62,7 @@ int main(int argc, char** argv) {
//Triggers the shutdown sequence at application exit //Triggers the shutdown sequence at application exit
std::atexit(ShutdownSequence); std::atexit(ShutdownSequence);
signal(SIGINT, [](int) { ShutdownSequence(); }); signal(SIGINT, [](int) { ShutdownSequence(); });
signal(SIGTERM, [](int) { ShutdownSequence(); });
//Create all the objects we need to run our service: //Create all the objects we need to run our service:
Game::logger = SetupLogger(); Game::logger = SetupLogger();