logging: don't close stderr in finalization

When logging to stderr, don't close it in finalization in case something
else still wanted to write to it. Leave it as it is together with stdin
and stdout.
This commit is contained in:
Miroslav Lichvar
2025-06-11 09:03:48 +02:00
parent 551bc266e4
commit df98fb4fc7

View File

@@ -91,7 +91,7 @@ LOG_Finalise(void)
if (system_log) if (system_log)
closelog(); closelog();
if (file_log) if (file_log && file_log != stderr)
fclose(file_log); fclose(file_log);
file_log = NULL; file_log = NULL;
Free(file_log_path); Free(file_log_path);