call _exit instead of abort in release mode

Avoids cores being created, as they're nowadays often piped
to some call home system
This commit is contained in:
moneromooo-monero
2018-01-26 10:35:13 +00:00
parent 09d19c9139
commit 851bd057ec
6 changed files with 49 additions and 7 deletions

View File

@@ -17,6 +17,8 @@
#define EASYLOGGING_CC
#include "easylogging++.h"
#include <unistd.h>
#if defined(AUTO_INITIALIZE_EASYLOGGINGPP)
INITIALIZE_EASYLOGGINGPP
#endif
@@ -35,8 +37,12 @@ static void abort(int status, const std::string& reason) {
#if defined(ELPP_COMPILER_MSVC) && defined(_M_IX86) && defined(_DEBUG)
// Ignore msvc critical error dialog - break instead (on debug mode)
_asm int 3
#else
#ifdef NDEBUG
::_exit(1);
#else
::abort();
#endif
#endif // defined(ELPP_COMPILER_MSVC) && defined(_M_IX86) && defined(_DEBUG)
}