On Fri, 29 Nov 2024 17:10:14 +0100
Robin Jarry <[email protected]> wrote:
> @@ -550,11 +555,8 @@ eal_log_init(const char *id)
> void
> rte_eal_log_cleanup(void)
> {
> - FILE *log_stream = rte_logs.file;
> -
> - /* don't close stderr on the application */
> - if (log_stream != NULL)
> - fclose(log_stream);
> -
> + if (rte_logs.is_internal_file && rte_logs.file != NULL)
> + fclose(rte_logs.file);
> rte_logs.file = NULL;
> + rte_logs.is_internal_file = false;
> }
The internal flag is ok, but we still don't want to close
stderr in cleanup. Only places where syslog or journal wrapper is used.