summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-15 12:59:28 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-15 12:59:28 +0200
commit60a7a0d4d0d592ef6e372edc919ef62e13ee062e (patch)
tree10e7c680fdbe16bb77ae64b1b568b9ff4b58f9c9
parentc68fb88446d2b996269c0ff459628164f9948848 (diff)
downloadrsyslog-60a7a0d4d0d592ef6e372edc919ef62e13ee062e.tar.gz
rsyslog-60a7a0d4d0d592ef6e372edc919ef62e13ee062e.tar.xz
rsyslog-60a7a0d4d0d592ef6e372edc919ef62e13ee062e.zip
$HUPisRestart removed
... but the rest of the code is not yet cleaned-up. Will do that slowly over time... (huge potential, but must be done carefully)
-rw-r--r--doc/v5compatibility.html4
-rw-r--r--runtime/glbl.c5
-rw-r--r--runtime/glbl.h3
-rw-r--r--tools/syslogd.c20
4 files changed, 8 insertions, 24 deletions
diff --git a/doc/v5compatibility.html b/doc/v5compatibility.html
index 7f5a784d..24fcbd25 100644
--- a/doc/v5compatibility.html
+++ b/doc/v5compatibility.html
@@ -10,8 +10,8 @@ This document describes things to keep in mind when moving from v4 to v5. It
does not list enhancements nor does it talk about compatibility concerns introduced
by earlier versions (for this, see their respective compatibility documents).
<h2>HUP processing</h2>
-<p>The $HUPisRestart directive is supported by some early v5 versions, but will soon been
-removed (around 5.1.x). That means that restart-type HUP processing is no longer
+<p>The $HUPisRestart directive is supported by some early v5 versions, but has been removed
+in 5.1.3 and above. That means that restart-type HUP processing is no longer
available. This processing was redundant and had a lot a drawbacks.
For details, please see the
<a href="v4compatibility.html">rsyslog v4 compatibility notes</a> which elaborate
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 7fa61963..534dc262 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -55,7 +55,6 @@ DEFobjCurrIf(prop)
*/
static uchar *pszWorkDir = NULL;
static int bOptimizeUniProc = 1; /* enable uniprocessor optimizations */
-static int bHUPisRestart = 0; /* should SIGHUP cause a full system restart? */
static int bPreserveFQDN = 0; /* should FQDNs always be preserved? */
static int iMaxLine = 2048; /* maximum length of a syslog message */
static int iDefPFFamily = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
@@ -95,7 +94,6 @@ static dataType Get##nameFunc(void) \
SIMP_PROP(OptimizeUniProc, bOptimizeUniProc, int)
SIMP_PROP(PreserveFQDN, bPreserveFQDN, int)
-SIMP_PROP(HUPisRestart, bHUPisRestart, int)
SIMP_PROP(MaxLine, iMaxLine, int)
SIMP_PROP(DefPFFamily, iDefPFFamily, int) /* note that in the future we may check the family argument */
SIMP_PROP(DropMalPTRMsgs, bDropMalPTRMsgs, int)
@@ -247,7 +245,6 @@ CODESTARTobjQueryInterface(glbl)
SIMP_PROP(MaxLine);
SIMP_PROP(OptimizeUniProc);
SIMP_PROP(PreserveFQDN);
- SIMP_PROP(HUPisRestart);
SIMP_PROP(DefPFFamily);
SIMP_PROP(DropMalPTRMsgs);
SIMP_PROP(Option_DisallowWarning);
@@ -293,7 +290,6 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
}
bDropMalPTRMsgs = 0;
bOptimizeUniProc = 1;
- bHUPisRestart = 0;
bPreserveFQDN = 0;
return RS_RET_OK;
}
@@ -316,7 +312,6 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdriverkeyfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrKeyFile, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdrivercertfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrCertFile, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"optimizeforuniprocessor", 0, eCmdHdlrBinary, NULL, &bOptimizeUniProc, NULL));
- CHKiRet(regCfSysLineHdlr((uchar *)"hupisrestart", 0, eCmdHdlrBinary, NULL, &bHUPisRestart, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"preservefqdn", 0, eCmdHdlrBinary, NULL, &bPreserveFQDN, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL));
ENDObjClassInit(glbl)
diff --git a/runtime/glbl.h b/runtime/glbl.h
index dcfb6d5f..8ecd8466 100644
--- a/runtime/glbl.h
+++ b/runtime/glbl.h
@@ -8,7 +8,7 @@
* Please note that there currently is no glbl.c file as we do not yet
* have any implementations.
*
- * Copyright 2008 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2008, 2009 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -44,7 +44,6 @@ BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Set##name)(dataType);
SIMP_PROP(MaxLine, int)
SIMP_PROP(OptimizeUniProc, int)
- SIMP_PROP(HUPisRestart, int)
SIMP_PROP(PreserveFQDN, int)
SIMP_PROP(DefPFFamily, int)
SIMP_PROP(DropMalPTRMsgs, int)
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 5809355d..f9b8adef 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -2362,7 +2362,7 @@ init()
*/
snprintf(bufStartUpMsg, sizeof(bufStartUpMsg)/sizeof(char),
" [origin software=\"rsyslogd\" " "swVersion=\"" VERSION \
- "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] (re)start",
+ "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] start",
(int) myPid);
logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)bufStartUpMsg, 0);
@@ -2371,7 +2371,7 @@ init()
sigAct.sa_handler = sighup_handler;
sigaction(SIGHUP, &sigAct, NULL);
- DBGPRINTF(" (re)started.\n");
+ DBGPRINTF(" started.\n");
finalize_it:
RETiRet;
@@ -2515,19 +2515,11 @@ doHUP(void)
snprintf(buf, sizeof(buf) / sizeof(char),
" [origin software=\"rsyslogd\" " "swVersion=\"" VERSION
- "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] rsyslogd was HUPed, type '%s'.",
- (int) myPid, glbl.GetHUPisRestart() ? "restart" : "lightweight");
+ "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] rsyslogd was HUPed",
+ (int) myPid);
errno = 0;
- logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)buf, 0);
- if(glbl.GetHUPisRestart()) {
- DBGPRINTF("Received SIGHUP, configured to be restart, reloading rsyslogd.\n");
- init(); /* main queue is stopped as part of init() */
- runInputModules();
- } else {
- DBGPRINTF("Received SIGHUP, configured to be a non-restart type of HUP - notifying actions.\n");
- ruleset.IterateAllActions(doHUPActions, NULL);
- }
+ ruleset.IterateAllActions(doHUPActions, NULL);
}
@@ -2803,12 +2795,10 @@ static rsRetVal mainThread()
*/
if(gidDropPriv != 0) {
doDropPrivGid(gidDropPriv);
- glbl.SetHUPisRestart(0); /* we can not do restart-type HUPs with dropped privs */
}
if(uidDropPriv != 0) {
doDropPrivUid(uidDropPriv);
- glbl.SetHUPisRestart(0); /* we can not do restart-type HUPs with dropped privs */
}
/* finally let the inputs run... */