summaryrefslogtreecommitdiffstats
path: root/runtime/wti.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-05-03 12:27:49 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-05-03 12:27:49 +0200
commit1bfaf4ac06e82c0e4008a2b851043a09aee1a2e3 (patch)
tree135a4da70f0efb7bb7710c6b01591f9dff14b708 /runtime/wti.c
parent415b95cf453403f726f654cbc03ef3984446a870 (diff)
downloadrsyslog-1bfaf4ac06e82c0e4008a2b851043a09aee1a2e3.tar.gz
rsyslog-1bfaf4ac06e82c0e4008a2b851043a09aee1a2e3.tar.xz
rsyslog-1bfaf4ac06e82c0e4008a2b851043a09aee1a2e3.zip
better handling of queue i/o errors in disk queues.
This is kind of a bugfix, but a very intrusive one, thus it goes into the devel version first. Right now, "file not found" is handled and leads to the new emergency mode, in which disk action is stopped and the queue run in direct mode. An error message is emited if this happens.
Diffstat (limited to 'runtime/wti.c')
-rw-r--r--runtime/wti.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/wti.c b/runtime/wti.c
index 9343f5c5..ec56c2d5 100644
--- a/runtime/wti.c
+++ b/runtime/wti.c
@@ -314,7 +314,10 @@ wtiWorker(wti_t *pThis)
*/
localRet = pWtp->pfDoWork(pWtp->pUsr, pThis);
- if(localRet == RS_RET_IDLE) {
+ if(localRet == RS_RET_ERR_QUEUE_EMERGENCY) {
+ d_pthread_mutex_unlock(pWtp->pmutUsr);
+ break; /* end of loop */
+ } else if(localRet == RS_RET_IDLE) {
if(terminateRet == RS_RET_TERMINATE_WHEN_IDLE || bInactivityTOOccured) {
d_pthread_mutex_unlock(pWtp->pmutUsr);
break; /* end of loop */