diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-04-09 10:54:04 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-04-09 10:54:04 +0200 |
commit | 86e34c6985da29c62f13ab83e44548f1fd21849d (patch) | |
tree | 4bae37bc40854dc0d60a68cacc1a7cd488c83961 /runtime/queue.c | |
parent | d9cde56eb8532bd660d6feb2249562afac0c40f6 (diff) | |
download | rsyslog-86e34c6985da29c62f13ab83e44548f1fd21849d.tar.gz rsyslog-86e34c6985da29c62f13ab83e44548f1fd21849d.tar.bz2 rsyslog-86e34c6985da29c62f13ab83e44548f1fd21849d.zip |
make imrelp properly terminate on system shutdown
it didn't do so if it was inside a retry loop
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index a464c2d7..5c736d2c 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1032,7 +1032,8 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch) * We use our knowledge about the batch_t structure below, but without that, we * pay a too-large performance toll... -- rgerhards, 2009-04-22 */ - iRet = pThis->pConsumer(pThis->pUsr, pBatch, &pThis->bShutdownImmediate); +dbgprintf("DDDD: qqueueEnqObjDirectBatch\n"); + iRet = pThis->pConsumer(pThis->pUsr, pBatch, NULL); RETiRet; } @@ -1191,6 +1192,7 @@ RUNLOG_STR("trying to shutdown workers within Action Timeout"); /* instruct workers to finish ASAP, even if still work exists */ DBGOPRINT((obj_t*) pThis, "setting EnqOnly mode\n"); pThis->bEnqOnly = 1; +dbgprintf("DDDD: setting shutdownImmediate mode, ptr %p!\n", &pThis->bShutdownImmediate); pThis->bShutdownImmediate = 1; /* now DA queue */ if(pThis->bIsDA) { @@ -1872,6 +1874,7 @@ ConsumerReg(qqueue_t *pThis, wti_t *pWti) /* at this spot, we may be cancelled */ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &iCancelStateSave); +dbgprintf("DDDD: calling consumer with shutdownImmeditate ptr %p\n", &pThis->bShutdownImmediate); CHKiRet(pThis->pConsumer(pThis->pUsr, &pWti->batch, &pThis->bShutdownImmediate)); /* we now need to check if we should deliberately delay processing a bit |