Bug 7406 - syslogd: fix re-opening log files after deleting or moving them
Summary: syslogd: fix re-opening log files after deleting or moving them
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.22.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-10 14:32 UTC by Christoph Schulz
Modified: 2014-09-10 14:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
fix re-opening log files after deleting or moving them (1.26 KB, patch)
2014-09-10 14:32 UTC, Christoph Schulz
Details

Note You need to log in before you can comment on or make changes to this bug.
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.