aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/syslogd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 2c959ff1b..d77fc9475 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