-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Description
Description'
Please ensure that the markdown structure is maintained.
Describe the problem you encountered here:
srs 2.0 logrotate copytruncate generates file holes
- SRS version:
2.0 - SRS log is as follows:
Please make sure to maintain the markdown structure.
\0\0\0 ....
normal log
Reproduction (Replay)
Please make sure to maintain the markdown structure.
Configure copy truncate in logrotate
When rotate is executed, the next file will have holes.
Refer to fix
d = ::open(filename.c_str(), O_RDWR | O_APPEND);
if(fd == -1 && errno == ENOENT) {
fd = open(filename.c_str(),
O_RDWR | O_CREAT | O_TRUNC | O_APPEND/*logrotate copytruncate need this flag*/,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
);
}
refer
https://blog.csdn.net/caomiao2006/article/details/12752359
Expected Behavior
The log file should not have any gaps.
TRANS_BY_GPT3
Metadata
Metadata
Assignees
Labels
TransByAITranslated by AI/GPT.Translated by AI/GPT.