1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +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

@ -13,6 +13,7 @@
#endif
// Be mindful of what you include here!
#include <csignal>
#include <string>
#include "config.h"
#include "irrlichttypes.h" // u64
@ -77,7 +78,7 @@ namespace porting
void signal_handler_init();
// Returns a pointer to a bool.
// When the bool is true, program should quit.
[[nodiscard]] bool *signal_handler_killstatus();
[[nodiscard]] volatile std::sig_atomic_t *signal_handler_killstatus();
/*
Path of static data directory.