mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Also handle SIGTERM (fixes #4610)
This commit is contained in:
parent
259a449b67
commit
f16e1f09c1
|
@ -3605,7 +3605,7 @@ void CServer::SnapSetStaticsize(int ItemType, int Size)
|
|||
|
||||
static CServer *CreateServer() { return new CServer(); }
|
||||
|
||||
void HandleSigInt(int Param)
|
||||
void HandleSigIntTerm(int Param)
|
||||
{
|
||||
if(InterruptSignaled)
|
||||
_Exit(1); // exit is not async-signal-safe and must not be called from a signal handler
|
||||
|
@ -3641,7 +3641,8 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
return -1;
|
||||
}
|
||||
|
||||
signal(SIGINT, HandleSigInt);
|
||||
signal(SIGINT, HandleSigIntTerm);
|
||||
signal(SIGTERM, HandleSigIntTerm);
|
||||
|
||||
CServer *pServer = CreateServer();
|
||||
IKernel *pKernel = IKernel::Create();
|
||||
|
|
Loading…
Reference in a new issue