Add handling of SIGTERM

This commit is contained in:
Felix Racz 2022-01-11 22:47:29 +01:00
parent 03e2a855b1
commit 2221945dc8

View File

@ -100,10 +100,8 @@ int main(int argc, char** argv) {
// Triggers the shutdown sequence at application exit // Triggers the shutdown sequence at application exit
std::atexit(WorldShutdownSequence); std::atexit(WorldShutdownSequence);
signal(SIGINT, [](int) signal(SIGINT, [](int){ WorldShutdownSequence(); });
{ signal(SIGTERM, [](int){ WorldShutdownSequence(); });
WorldShutdownSequence();
});
int zoneID = 1000; int zoneID = 1000;
int cloneID = 0; int cloneID = 0;