mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix logrotate empty file hole issue (#1561)
* fix logrotate empty file hole issue refer to https://github.com/ossrs/srs/issues/1554
This commit is contained in:
parent
b5f4b96060
commit
459488bcf8
1 changed files with 1 additions and 1 deletions
|
@ -414,7 +414,7 @@ void SrsFastLog::open_log_file()
|
|||
|
||||
if(fd == -1 && errno == ENOENT) {
|
||||
fd = open(filename.c_str(),
|
||||
O_RDWR | O_CREAT | O_TRUNC,
|
||||
O_RDWR | O_CREAT | O_TRUNC | O_APPEND/*logrotate copytruncate need this flag*/,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue