diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index b9d31919d..7c1e20aa5 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -50,7 +50,7 @@ #include -volatile bool InterruptSignaled = false; +volatile sig_atomic_t InterruptSignaled = 0; CSnapIDPool::CSnapIDPool() { @@ -3608,9 +3608,9 @@ static CServer *CreateServer() { return new CServer(); } void HandleSigInt(int Param) { if(InterruptSignaled) - exit(1); + _Exit(1); // exit is not async-signal-safe and must not be called from a signal handler else - InterruptSignaled = true; + InterruptSignaled = 1; } int main(int argc, const char **argv) // ignore_convention