Merge pull request #519 from mc-server/sigterm
Graceful shutdown on SIGTERM
This commit is contained in:
commit
b952ea11c7
@ -1 +1 @@
|
||||
Subproject commit 302115ae19276227bf371971d4b6fa5f9f857da0
|
||||
Subproject commit c65b56767a5e59ca387a05be72ef18791baa9aed
|
@ -50,6 +50,11 @@ void NonCtrlHandler(int a_Signal)
|
||||
LOGWARN("Segmentation fault; MCServer has crashed :(");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
case SIGTERM:
|
||||
{
|
||||
std::signal(SIGTERM, SIG_IGN); // Server is shutting down, wait for it...
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user