#endif
Signal2<void, int, const std::string&> logOutput;
-int logOutputConsole=0;
+int logOutputConsole=1;
static pthread_mutex_t DebugLock =
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
+extern void bsodFatal();
+
void eFatal(const char* fmt, ...)
{
char buf[1024];
singleLock s(DebugLock);
logOutput(lvlFatal, buf);
fprintf(stderr, "FATAL: %s\n",buf );
- _exit(0);
+ bsodFatal();
}
#ifdef DEBUG
if (logOutputConsole)
fprintf(stderr, "%s\n", buf);
}
+#endif // DEBUG
void ePythonOutput(const char *string)
{
+#ifdef DEBUG
singleLock s(DebugLock);
logOutput(lvlWarning, string);
if (logOutputConsole)
fwrite(string, 1, strlen(string), stderr);
+#endif
}
-#endif // DEBUG
void eWriteCrashdump()
{