Bug 7406

Summary: syslogd: fix re-opening log files after deleting or moving them
Product: Busybox Reporter: Christoph Schulz <develop>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.22.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: fix re-opening log files after deleting or moving them

Description Christoph Schulz 2014-09-10 14:32:40 UTC
Created attachment 5636 [details]
fix re-opening log files after deleting or moving them

With the patch attached, syslogd correctly re-opens log files. The current code uses one global last-logged timestamp for all log targets. If a message is to be logged to multiple log files, the global last-logged timestamp is compared to the current system time. If there is a difference of at least one second, the log file is re-opened and the timestamp is updated. However, because of the timestamp update, all subsequent log files are _not_ re-opened even if they need to.

The patch attached uses a per-log-target timestamp to overcome this bug.