aboutsummaryrefslogtreecommitdiff
path: root/external/easylogging++/easylogging++.cc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-26 10:35:13 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-01 13:32:46 +0000
commit851bd057ecfa2997252429f86362b0a710a1af8d (patch)
treeee07556385050124c85bcc76fea1cb1b81da65c5 /external/easylogging++/easylogging++.cc
parentMerge pull request #3130 (diff)
downloadmonero-851bd057ecfa2997252429f86362b0a710a1af8d.tar.xz
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/easylogging++/easylogging++.cc')
-rw-r--r--external/easylogging++/easylogging++.cc6
1 files changed, 6 insertions, 0 deletions
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)
}