Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #29: prevent repeating kernel messages when syslogd is restarted
This patch fixes the problem with kernel messages being repeated when syslogd is restarted at runtime. This is achieved by caching the last seqno read from /dev/kmsg to /run/syslogd.cache. The latter is usually a ram disk these days so it should be a fairly quick op. Excessive updates are prevented by only caching after handling all callbacks in the socket_poll() loop, and only updating the cache if there has been any new kernel messages since last update. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters