mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Merge pull request #359 from AxtonF/HandleSIGTERM
Add handling of SIGTERM
This commit is contained in:
commit
b8c1f7629e
@ -63,6 +63,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();
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user