Graceful shutdown on SIGTERM
This commit is contained in:
parent
524aecc106
commit
f578dbfc54
@ -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