summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-25 12:59:13 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-25 12:59:13 +0200
commit5af5b1e42868d00dfbc5fa47028768d0a03f8e32 (patch)
treeb967f080a0ae440cabda11d36475894e9fa43916 /tools
parentd12b9e0c67cc72c9b1631bf2a5611d383e7ad69d (diff)
downloadrsyslog-5af5b1e42868d00dfbc5fa47028768d0a03f8e32.tar.gz
rsyslog-5af5b1e42868d00dfbc5fa47028768d0a03f8e32.tar.xz
rsyslog-5af5b1e42868d00dfbc5fa47028768d0a03f8e32.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 6f264e5e..0fdaf5ba 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -299,7 +299,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 */
@@ -363,7 +363,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;