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:
commit
c08b6f1961
3 changed files with 6 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue