syslogd: avoid spurious ftrunctate() calls for "-b 0"
authorJoshua Judson Rosen <jrosen@harvestai.com>
Tue, 20 May 2014 05:02:18 +0000 (01:02 -0400)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 2 Jun 2014 01:11:38 +0000 (03:11 +0200)
commit1b90e031c3a3bd6dc5c2a34193ec6e9727b79a39
treedbf16a94e27d0ce62985c48417eb3fe732ba1f7f
parentfd0640e5a12f74b7ab1d918cf884df0c59402c5a
syslogd: avoid spurious ftrunctate() calls for "-b 0"

Forgetting to re-set log_file->size after truncating to zero
discards log-data for the next 1 second following an oversize-induced purge,
when we shouldn't necessarily throw that data away.

Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
sysklogd/syslogd.c