summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-02-11 17:47:30 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-02-11 17:47:30 +0100
commitf3d354da3e373f9c4890a78e5274a6ba02f1c8cb (patch)
tree9fd7c964af36dfa1802bf08173fefca2a9453a4e /plugins
parent6a18d25cbec2676a7910ff038170716293abe89f (diff)
downloadrsyslog-f3d354da3e373f9c4890a78e5274a6ba02f1c8cb.tar.gz
rsyslog-f3d354da3e373f9c4890a78e5274a6ba02f1c8cb.tar.xz
rsyslog-f3d354da3e373f9c4890a78e5274a6ba02f1c8cb.zip
bugfix: very long running actions could prevent shutdown under some circumstances
This has now been solved, at least for common situations.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imfile/imfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index 7f6b9c24..c71e425e 100644
--- a/plugins/imfile/imfile.c
+++ b/plugins/imfile/imfile.c
@@ -291,13 +291,13 @@ CODESTARTrunInput
pthread_cleanup_push(inputModuleCleanup, NULL);
while(glbl.GetGlobalInputTermState() == 0) {
do {
- if(glbl.GetGlobalInputTermState() == 1)
- break; /* terminate input! */
bHadFileData = 0;
for(i = 0 ; i < iFilPtr ; ++i) {
+ if(glbl.GetGlobalInputTermState() == 1)
+ break; /* terminate input! */
pollFile(&files[i], &bHadFileData);
}
- } while(iFilPtr > 1 && bHadFileData == 1); /* warning: do...while()! */
+ } while(iFilPtr > 1 && bHadFileData == 1 && glbl.GetGlobalInputTermState() == 0); /* warning: do...while()! */
/* Note: the additional 10ns wait is vitally important. It guards rsyslog against totally
* hogging the CPU if the users selects a polling interval of 0 seconds. It doesn't hurt any