diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-15 12:59:28 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-15 12:59:28 +0200 |
commit | 60a7a0d4d0d592ef6e372edc919ef62e13ee062e (patch) | |
tree | 10e7c680fdbe16bb77ae64b1b568b9ff4b58f9c9 /tools | |
parent | c68fb88446d2b996269c0ff459628164f9948848 (diff) | |
download | rsyslog-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)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 20 |
1 files changed, 5 insertions, 15 deletions
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... */ |