Avoid duplicate fatal stderr output in GUI mode

This commit is contained in:
Andrea Mazzoleni 2026-09-17 18:20:27 +02:00
parent d0194c3aff
commit ecb12ee92c
6 changed files with 51 additions and 18 deletions

View file

@ -92,7 +92,8 @@ typedef void log_ptr(int err, const char* format, ...) __attribute__((format(att
*
* Messages printed before an early termination.
*
* These messages go in the log file and in stderr unconditionally.
* These messages go in the log file and in stderr, except in GUI mode
* when the tagged log message is emitted successfully.
*/
void vlog_fatal(int err, const char* format, va_list ap, const char* post);
void log_fatal(int err, const char* format, ...) __attribute__((format(attribute_printf, 2, 3)));
@ -176,6 +177,11 @@ typedef void msg_ptr(const char* format, ...) __attribute__((format(attribute_pr
*/
extern int msg_level;
/**
* Emit fatal messages on stderr also when a log is configured.
*/
extern int msg_fatal_stderr;
/**
* State messages.
*