git: syslogd(8): Fix klog may be broken into multiple incomplete lines
Aaron LI
aly at crater.dragonflybsd.org
Tue Jul 20 16:30:37 PDT 2021
commit ae46c1640fd9f8c4ae021ca4d591411738a7cb31
Author: Aaron LI <aly at aaronly.me>
Date: Tue Jul 20 07:33:33 2021 +0800
syslogd(8): Fix klog may be broken into multiple incomplete lines
Fix readklog() to not emit partial lines by changing it to use a static
buffer for reading log lines from /dev/klog. Thus we can make it
only emit the line for printing if there is a complete line.
This fixes the issue that a kernel log line may be broken into multiple
incomplete lines that are written into log file by syslogd(8),
especially when the system is under load.
Patch-by: Matt Dillon
Summary of changes:
usr.sbin/syslogd/syslogd.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ae46c1640fd9f8c4ae021ca4d591411738a7cb31
--
DragonFly BSD source repository
More information about the Commits
mailing list