mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Make this one a bit more robust
This commit is contained in:
parent
7c19b2fac5
commit
6fe43f5823
@ -1992,12 +1992,17 @@ static uint64_t frontend_linux_get_mem_used(void)
|
||||
return total - freemem - buffers - cached;
|
||||
}
|
||||
|
||||
/*#include <valgrind/valgrind.h>*/
|
||||
static void frontend_linux_sighandler(int sig)
|
||||
{
|
||||
#ifdef VALGRIND_PRINTF_BACKTRACE
|
||||
VALGRIND_PRINTF_BACKTRACE("SIGINT");
|
||||
#endif
|
||||
(void)sig;
|
||||
if (linux_sighandler_quit)
|
||||
exit(1);
|
||||
linux_sighandler_quit = 1;
|
||||
linux_sighandler_quit++;
|
||||
if (linux_sighandler_quit == 1) {}
|
||||
if (linux_sighandler_quit == 2) exit(1);
|
||||
if (linux_sighandler_quit >= 3) abort(); /* in case there's a second deadlock in a C++ destructor or something */
|
||||
}
|
||||
|
||||
static void frontend_linux_install_signal_handlers(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user