summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-25 12:53:00 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-25 12:53:00 +0200
commitd116f30a877c65b4f23dbb92601251402b0f957e (patch)
tree4670311037ee3862e64260044eaf4599a1ed4856 /tools
parente56a30372e807019618570ed70874a3389da2ac2 (diff)
downloadrsyslog-d116f30a877c65b4f23dbb92601251402b0f957e.tar.gz
rsyslog-d116f30a877c65b4f23dbb92601251402b0f957e.tar.xz
rsyslog-d116f30a877c65b4f23dbb92601251402b0f957e.zip
improvements/fixes in queue termination timeout handling
- bugfix: subtle (and usually irrelevant) issue in timout processing timeout could be one second too early if nanoseconds wrapped - set a more sensible timeout for shutdow, now 1.5 seconds to complete processing (this also removes those cases where the shutdown message was not written because the termination happened before it)
Diffstat (limited to 'tools')
-rw-r--r--tools/syslogd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index ace08e58..6a3fa6c9 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -302,7 +302,7 @@ static uchar *pszMainMsgQFName = NULL; /* prefix for the main message queue f
static int64 iMainMsgQueMaxFileSize = 1024*1024;
static int iMainMsgQPersistUpdCnt = 0; /* persist queue info every n updates */
static int bMainMsgQSyncQeueFiles = 0; /* sync queue files on every write? */
-static int iMainMsgQtoQShutdown = 0; /* queue shutdown */
+static int iMainMsgQtoQShutdown = 1500; /* queue shutdown (ms) */
static int iMainMsgQtoActShutdown = 1000; /* action shutdown (in phase 2) */
static int iMainMsgQtoEnq = 2000; /* timeout for queue enque */
static int iMainMsgQtoWrkShutdown = 60000; /* timeout for worker thread shutdown */
@@ -367,7 +367,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
iMainMsgQueueNumWorkers = 1;
iMainMsgQPersistUpdCnt = 0;
bMainMsgQSyncQeueFiles = 0;
- iMainMsgQtoQShutdown = 0;
+ iMainMsgQtoQShutdown = 1500;
iMainMsgQtoActShutdown = 1000;
iMainMsgQtoEnq = 2000;
iMainMsgQtoWrkShutdown = 60000;