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:
parent
56a7f0b7cf
commit
0bb87eb1ff
11 changed files with 53 additions and 42 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue