fix signal handler stuff for worker threads

g_in_exiting_signal_handler needs to be set BEFORE it actually exits lol
This commit is contained in:
Alug committed 2025-09-17 20:36:01 +02:00
1 parent d57d1dd20b
commit 0645e38467
1 file changed
+2 -2
+2 -2
View File
@@ -523,6 +523,8 @@ static void I_ReportSignal(int num, int coredumped)
#ifndef NEWSIGNALHANDLER
FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
{
g_in_exiting_signal_handler = true;
#ifdef HAVE_THREADS
if (g_main_thread_id != std::this_thread::get_id())
{
@@ -533,8 +535,6 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
}
#endif
g_in_exiting_signal_handler = true;
D_QuitNetGame(); // Fix server freezes
#ifdef HAVE_LIBBACKTRACE