Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etLogger.c')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etLogger.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etLogger.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etLogger.c
index f4f5b38f2..e730556e4 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etLogger.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etLogger.c
@@ -16,6 +16,12 @@
#include <stdarg.h>
+/*
+ * Error log messages are redirected to stdout to preserve the chronological order of the logs.
+ * Furthermore writing to stderr from threads other than the main thread sometimes causes segfaults.
+ * This seems to be related to the fact that stderr ist usually unbuffered whereas stdout is buffered.
+ * However, I could not comprehend the problem.
+ */
void etLogger_logError(const char* message){
fprintf(stdout, "ERROR: %s\n", message);

Back to the top