mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Use _Exit instead of exit under Linux
The best ExitProcess alternative for Linux is _Exit since it doesn't call exit handlers. This fixes also #178 since, with exit, it aborts due to some std::threads not correctly joined.
This commit is contained in:
parent
b752d2eddd
commit
96d98fd3ab
@ -26,7 +26,7 @@ void handler_SIGINT(int sig)
|
||||
* by any mean ends up with a SIGABRT from the standard library destroying
|
||||
* threads.
|
||||
*/
|
||||
exit(0);
|
||||
_Exit(0);
|
||||
}
|
||||
|
||||
void ExceptionHandler_init()
|
||||
|
||||
@ -142,7 +142,7 @@ int CemuApp::OnExit()
|
||||
#if BOOST_OS_WINDOWS
|
||||
ExitProcess(0);
|
||||
#else
|
||||
exit(0);
|
||||
_Exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -47,6 +47,8 @@
|
||||
|
||||
#if BOOST_OS_WINDOWS
|
||||
#define exit(__c) ExitProcess(__c)
|
||||
#else
|
||||
#define exit(__c) _Exit(__c)
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user