From 66abc28b2ab9ff00dc8564efa2271d780cd3837c Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 4 May 2026 23:01:43 +0200 Subject: [PATCH] delet I_ShutdownConsole spam without process forking I_ShutdownSystem will handle it, otherwise the parent process calls it before exiting --- src/dedicated/i_system.c | 10 +++------- src/sdl/i_system.cpp | 3 --- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/dedicated/i_system.c b/src/dedicated/i_system.c index 9f103d9c9..f503ab1df 100644 --- a/src/dedicated/i_system.c +++ b/src/dedicated/i_system.c @@ -1384,14 +1384,12 @@ static void I_Fork(void) fclose(logstream);/* the child has this */ c = wait(&status); - #ifdef LOGMESSAGES /* By the way, exit closes files. */ logstream = fopen(logfilename, "at"); #else logstream = 0; #endif - if (c == -1) { kill(child, SIGKILL); @@ -1453,7 +1451,6 @@ void I_Quit(void) goto death; quiting = false; - I_ShutdownConsole(); M_SaveConfig(NULL); //save game config, cvars.. D_SaveBan(); // save the ban list G_SaveGameData(false); // Tails 12-08-2002 @@ -1543,8 +1540,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) #endif // --- - I_ShutdownConsole(); - M_SaveConfig(NULL); // save game config, cvars.. D_SaveBan(); // save the ban list G_SaveGameData(false); // Tails 12-08-2002 @@ -1665,9 +1660,10 @@ void I_ShutdownSystem(void) { INT32 c; -#ifndef NEWSIGNALHANDLER - I_ShutdownConsole(); +#ifdef NEWSIGNALHANDLER + if (M_CheckParm("-nofork")) #endif + I_ShutdownConsole(); for (c = MAX_QUIT_FUNCS-1; c >= 0; c--) if (quit_funcs[c]) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index ab0b60be3..b5fe5ca77 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -2014,7 +2014,6 @@ FUNCNORETURN void ATTRNORETURN I_Quit(void) is_quitting = true; SDL_ShowCursor(SDL_TRUE); - I_ShutdownConsole(); M_SaveConfig(NULL); //save game config, cvars.. D_SaveBan(); // save the ban list G_SaveGameData(false); // Tails 12-08-2002 @@ -2120,8 +2119,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) // --- - I_ShutdownConsole(); - M_SaveConfig(NULL); // save game config, cvars.. D_SaveBan(); // save the ban list G_SaveGameData(false); // Tails 12-08-2002