From df98fb4fc79d33a788b51cc0762917f42e9a768f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 11 Jun 2025 09:03:48 +0200 Subject: [PATCH] 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. --- logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging.c b/logging.c index db2e6f60..269f1cd9 100644 --- a/logging.c +++ b/logging.c @@ -91,7 +91,7 @@ LOG_Finalise(void) if (system_log) closelog(); - if (file_log) + if (file_log && file_log != stderr) fclose(file_log); file_log = NULL; Free(file_log_path); -- 2.47.2