mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #3187
851bd057
call _exit instead of abort in release mode (moneromooo-monero)
This commit is contained in:
commit
666a76652b
6 changed files with 49 additions and 7 deletions
4
external/db_drivers/liblmdb/mdb.c
vendored
4
external/db_drivers/liblmdb/mdb.c
vendored
|
@ -1635,7 +1635,11 @@ mdb_assert_fail(MDB_env *env, const char *expr_txt,
|
|||
if (env->me_assert_func)
|
||||
env->me_assert_func(env, buf);
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
#ifdef NDEBUG
|
||||
_exit();
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
# define mdb_assert0(env, expr, expr_txt) ((void) 0)
|
||||
|
|
6
external/easylogging++/easylogging++.cc
vendored
6
external/easylogging++/easylogging++.cc
vendored
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue