From: Miroslav Lichvar Date: Wed, 11 Jun 2025 07:03:48 +0000 (+0200) Subject: logging: don't close stderr in finalization X-Git-Tag: 4.7~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df98fb4fc79d33a788b51cc0762917f42e9a768f;p=thirdparty%2Fchrony.git 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. --- 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);