Skip to content

Commit df98fb4

Browse files
committed
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.
1 parent 551bc26 commit df98fb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

logging.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ LOG_Finalise(void)
9191
if (system_log)
9292
closelog();
9393

94-
if (file_log)
94+
if (file_log && file_log != stderr)
9595
fclose(file_log);
9696
file_log = NULL;
9797
Free(file_log_path);

0 commit comments

Comments
 (0)