diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-27 10:49:43 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-27 10:49:43 +0000 |
commit | eb006d74dd8bbadbd7a551e732e373e7cf3ad9c9 (patch) | |
tree | d796696a0edac5701ca9726ee5f564fc4e405410 /stream.c | |
parent | 327467c6f685d25621bb33bc3ab746800ba008d2 (diff) | |
download | rsyslog-eb006d74dd8bbadbd7a551e732e373e7cf3ad9c9.tar.gz rsyslog-eb006d74dd8bbadbd7a551e732e373e7cf3ad9c9.tar.xz rsyslog-eb006d74dd8bbadbd7a551e732e373e7cf3ad9c9.zip |
bugfix: queue disk file were not properly persisted when immediately after
closing an output file rsyslog was stopped or huped (the new output
file open must NOT have happend at that point) - this lead to a sparse
and invalid queue file which could cause several problems to the engine
(unpredictable results). This situation should have happened only in
very rare cases. tracker:
http://bugzilla.adiscon.com/show_bug.cgi?id=40
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -137,6 +137,7 @@ static rsRetVal strmCloseFile(strm_t *pThis) unlink((char*) pThis->pszCurrFName); // TODO: check returncode } + pThis->iCurrOffs = 0; /* we are back at begin of file */ if(pThis->pszCurrFName != NULL) { free(pThis->pszCurrFName); /* no longer needed in any case (just for open) */ pThis->pszCurrFName = NULL; @@ -199,7 +200,6 @@ strmHandleEOFMonitor(strm_t *pThis) ABORT_FINALIZE(RS_RET_IO_ERROR); if(stat((char*) pThis->pszCurrFName, &statName) == -1) ABORT_FINALIZE(RS_RET_IO_ERROR); -//dbgoprint((obj_t*)pThis, "curr ino %d, new ino %d, curr offset %lld, new size %ld\n", statOpen.st_ino, statName.st_ino, pThis->iCurrOffs, statName.st_size); if(statOpen.st_ino == statName.st_ino && pThis->iCurrOffs == statName.st_size) { ABORT_FINALIZE(RS_RET_EOF); } else { |