diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-01-26 10:35:13 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-01 13:32:46 +0000 |
| commit | 851bd057ecfa2997252429f86362b0a710a1af8d (patch) | |
| tree | ee07556385050124c85bcc76fea1cb1b81da65c5 /external | |
| parent | 09d19c9139918524c5b08aa8dc39cf9985f3d999 (diff) | |
| download | monzero-core-851bd057ecfa2997252429f86362b0a710a1af8d.tar.gz monzero-core-851bd057ecfa2997252429f86362b0a710a1af8d.tar.xz monzero-core-851bd057ecfa2997252429f86362b0a710a1af8d.zip | |
call _exit instead of abort in release mode
Avoids cores being created, as they're nowadays often piped
to some call home system
Diffstat (limited to 'external')
| -rw-r--r-- | external/db_drivers/liblmdb/mdb.c | 4 | ||||
| -rw-r--r-- | external/easylogging++/easylogging++.cc | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/external/db_drivers/liblmdb/mdb.c b/external/db_drivers/liblmdb/mdb.c index 87b244ce7..bb0420453 100644 --- a/external/db_drivers/liblmdb/mdb.c +++ b/external/db_drivers/liblmdb/mdb.c @@ -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) diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc index 57742b2e5..212a1822d 100644 --- a/external/easylogging++/easylogging++.cc +++ b/external/easylogging++/easylogging++.cc @@ -17,6 +17,8 @@ #define EASYLOGGING_CC #include "easylogging++.h" +#include <unistd.h> + #if defined(AUTO_INITIALIZE_EASYLOGGINGPP) INITIALIZE_EASYLOGGINGPP #endif @@ -36,7 +38,11 @@ static void abort(int status, const std::string& reason) { // 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) } |
