1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 53 additions and 42 deletions

View file

@ -147,8 +147,8 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
/*
Menu-game loop
*/
bool retval = true;
bool *kill = porting::signal_handler_killstatus();
bool retval = true;
volatile auto *kill = porting::signal_handler_killstatus();
while (m_rendering_engine->run() && !*kill &&
!g_gamecallback->shutdown_requested) {
@ -540,9 +540,9 @@ bool ClientLauncher::launch_game(std::string &error_message,
void ClientLauncher::main_menu(MainMenuData *menudata)
{
bool *kill = porting::signal_handler_killstatus();
volatile auto *kill = porting::signal_handler_killstatus();
video::IVideoDriver *driver = m_rendering_engine->get_video_driver();
auto *device = m_rendering_engine->get_raw_device();
auto *device = m_rendering_engine->get_raw_device();
// Wait until app is in foreground because of #15883
infostream << "Waiting for app to be in foreground" << std::endl;