Skip to content
Commit dfa9c325 authored by Peter Portante's avatar Peter Portante Committed by Zbigniew Jędrzejewski-Szmek
Browse files

journalctl: Periodically call sd_journal_process in journalctl

If `journalctl` take a long time to process messages, and during that
time journal file rotation occurs, a `journalctl` client will keep
those rotated files open until it calls `sd_journal_process()`, which
typically happens as a result of calling `sd_journal_wait()` below in
the "following" case.  By periodically calling `sd_journal_process()`
during the processing loop we shrink the window of time a client
instance has open file descriptors for rotated (deleted) journal
files.

(Lennart: slightly reworked version, that dropped some of the commenting
which was solved otherwise)

(cherry picked from commit ec316d19)
(cherry picked from commit f169758b)
parent 4f3f2adf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment