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>
This commit is contained in:
parent
1b90e031c3
commit
b905d6c2ea
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user