summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysklogd/syslogd.c4
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