diff options
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -429,6 +429,15 @@ inline int OutputDebugStringF(const char* pszFormat, ...) | |||
| 429 | "debug.log grew past %lld MB; previous contents moved to debug.log.old (-maxdebugfilesize)\n", | 429 | "debug.log grew past %lld MB; previous contents moved to debug.log.old (-maxdebugfilesize)\n", |
| 430 | (long long)(nMaxDebugFileSize / 1024 / 1024)); | 430 | (long long)(nMaxDebugFileSize / 1024 / 1024)); |
| 431 | } | 431 | } |
| 432 | else if (nRenameErrno == ENOENT) | ||
| 433 | { | ||
| 434 | // The file went away between the size check and the | ||
| 435 | // rename, so an external rotator (logrotate) got there | ||
| 436 | // first. Nothing left to roll and nothing wrong: the | ||
| 437 | // fopen above has already recreated it. Latching on this | ||
| 438 | // would let a benign race with logrotate switch the cap | ||
| 439 | // off for the rest of the run. | ||
| 440 | } | ||
| 432 | else | 441 | else |
| 433 | { | 442 | { |
| 434 | // The file is still over the cap, so this branch would be | 443 | // The file is still over the cap, so this branch would be |