Avoid signal-unsafe operations in POSIX signal handler (#16160)

This commit is contained in:
JosiahWI
2025-06-01 08:24:32 -05:00
committed by GitHub
parent 56a7f0b7cf
commit 0bb87eb1ff
11 changed files with 53 additions and 42 deletions

View File

@@ -14,6 +14,8 @@
#include "util/enriched_string.h"
#include "translation.h"
#include <csignal>
/******************************************************************************/
/* Structs and macros */
/******************************************************************************/
@@ -124,7 +126,7 @@ class GUIEngine {
RenderingEngine *rendering_engine,
IMenuManager *menumgr,
MainMenuData *data,
bool &kill);
volatile std::sig_atomic_t &kill);
/** default destructor */
virtual ~GUIEngine();
@@ -193,7 +195,7 @@ class GUIEngine {
irr_ptr<GUIFormSpecMenu> m_menu;
/** reference to kill variable managed by SIGINT handler */
bool &m_kill;
volatile std::sig_atomic_t &m_kill;
/** variable used to abort menu and return back to main game handling */
bool m_startgame = false;