diff options
author | Joshua Judson Rosen | 2014-05-20 01:02:19 -0400 |
---|---|---|
committer | Denys Vlasenko | 2014-06-02 03:11:39 +0200 |
commit | b905d6c2eaaf7ad92a50dccc7b91ee19dd9424b7 (patch) | |
tree | 54c9bfcd28946e991f1e3df49e24101122e475ee /sysklogd | |
parent | 1b90e031c3a3bd6dc5c2a34193ec6e9727b79a39 (diff) | |
download | busybox-b905d6c2eaaf7ad92a50dccc7b91ee19dd9424b7.zip busybox-b905d6c2eaaf7ad92a50dccc7b91ee19dd9424b7.tar.gz |
syslogd: remember to un-writelock log-files even when called with "-b 0"
Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/syslogd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 2c959ff..d77fc94 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -670,6 +670,10 @@ static void log_locally(time_t now, char *msg, logFile_t *log_file) */ ftruncate(log_file->fd, 0); log_file->size = 0; +#ifdef SYSLOGD_WRLOCK + fl.l_type = F_UNLCK; + fcntl(log_file->fd, F_SETLKW, &fl); +#endif } log_file->size += #endif |