Skip to content

gmessages: don't memoize in g_log_writer_is_journald()

Will Thompson requested to merge dont-memoize-in-g_log_writer_is_journald into master

Previously, g_log_writer_is_journald() would cache the result for the first (non-negative) FD it was called on, and return that result for all future (non-negative) FDs. While unlikely, it's possible that applications might call this function on something other than fileno(stderr).

Move the memoization into g_log_writer_default(), which always passes fileno(stderr).

Fixes #1589 (closed).

Merge request reports