Also handle SIGTERM (fixes #4610)

This commit is contained in:
Dennis Felsing 2022-01-17 23:10:25 +01:00
parent 259a449b67
commit f16e1f09c1

View file

@ -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();