syslogd: Unify unlink/truncate + unlock log-rotation logic
authorJoshua Judson Rosen <jrosen@harvestai.com>
Tue, 20 May 2014 05:02:20 +0000 (01:02 -0400)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 2 Jun 2014 01:11:40 +0000 (03:11 +0200)
commit9aa6ffb22b712d4e928604e291f954b02237e8cd
treead606fe29c75f2acfdad5c2b328d56f911c3047e
parentb905d6c2eaaf7ad92a50dccc7b91ee19dd9424b7
syslogd: Unify unlink/truncate + unlock log-rotation logic

Always unlink + reopen, rather than sometimes using ftruncate();
using a single code-path reduces the opportunity for either
mistakes or duplicate code.

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