1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge 2.0, support logrotate copytruncate. 3.0.96

This commit is contained in:
winlin 2020-01-08 18:05:42 +08:00
commit c08b6f1961
3 changed files with 6 additions and 7 deletions

View file

@ -318,11 +318,7 @@ void SrsFastLog::open_log_file()
if (filename.empty()) {
return;
}
fd = ::open(filename.c_str(), O_RDWR | O_APPEND);
if(fd == -1 && errno == ENOENT) {
fd = open(filename.c_str(), O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
}
fd = ::open(filename.c_str(), O_RDWR | O_CREAT | O_APPEND);
}

View file

@ -27,7 +27,7 @@
// The version config.
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#define VERSION_REVISION 95
#define VERSION_REVISION 96
// The macros generated by configure script.
#include <srs_auto_headers.hpp>