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)
Loading
Please register or sign in to comment