diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-28 11:35:08 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-28 11:35:08 +0000 |
commit | ba94662f209ccf17798d706eb4dc5df19360c7e1 (patch) | |
tree | 7826c60e87e8c66ee3d505cac2ae538692528469 | |
parent | 59b67824d6ada9e224beef8ec9a6e6e566e1fcf8 (diff) | |
download | rsyslog-ba94662f209ccf17798d706eb4dc5df19360c7e1.tar.gz rsyslog-ba94662f209ccf17798d706eb4dc5df19360c7e1.tar.xz rsyslog-ba94662f209ccf17798d706eb4dc5df19360c7e1.zip |
- cleanup to prepare for release
- PID file is now also written in debug mode
-rw-r--r-- | syslogd.c | 32 |
1 files changed, 13 insertions, 19 deletions
@@ -1,4 +1,3 @@ -// TODO: $MainMsgQueueDiscardSeverity must accept textual severities! /** * \brief This is the main file of the rsyslogd daemon. * @@ -3229,7 +3228,7 @@ static rsRetVal processConfFile(uchar *pConfFile) } else cline = cbuf; #endif - *++p = '\0'; // TODO: check this + *++p = '\0'; /* TODO: check this */ /* we now have the complete line, and are positioned at the first non-whitespace * character. So let's process it @@ -4720,8 +4719,6 @@ static rsRetVal InitGlobalClasses(void) DEFiRet; CHKiRet(objClassInit()); /* *THIS* *MUST* always be the first class initilizere called! */ -fprintf(stdout, " calling dbgClassInit\n"); - //CHKiRet(dbgClassInit()); CHKiRet(MsgClassInit()); CHKiRet(strmClassInit()); CHKiRet(wtiClassInit()); @@ -4931,23 +4928,20 @@ dbgClassInit(); dbgprintf("Compatibility Mode: %d\n", iCompatibilityMode); /* tuck my process id away */ - if (1) // !Debug ) + dbgprintf("Writing pidfile %s.\n", PidFile); + if (!check_pid(PidFile)) { - dbgprintf("Writing pidfile %s.\n", PidFile); - if (!check_pid(PidFile)) - { - if (!write_pid(PidFile)) - { - fputs("Can't write pid.\n", stderr); - exit(1); /* exit during startup - questionable */ - } - } - else + if (!write_pid(PidFile)) { - fputs("Pidfile (and pid) already exist.\n", stderr); + fputs("Can't write pid.\n", stderr); exit(1); /* exit during startup - questionable */ } - } /* if ( !Debug ) */ + } + else + { + fputs("Pidfile (and pid) already exist.\n", stderr); + exit(1); /* exit during startup - questionable */ + } myPid = getpid(); /* save our pid for further testing (also used for messages) */ @@ -5004,8 +4998,8 @@ dbgClassInit(); sigAct.sa_handler = reapchild; sigaction(SIGCHLD, &sigAct, NULL); sigAct.sa_handler = Debug ? debug_switch : SIG_IGN; -// TODO: use signal 2 - //sigaction(SIGUSR1, &sigAct, NULL); + /* TODO: use signal 2 */ + /*sigaction(SIGUSR1, &sigAct, NULL);*/ sigAct.sa_handler = SIG_IGN; sigaction(SIGPIPE, &sigAct, NULL); sigaction(SIGXFSZ, &sigAct, NULL); /* do not abort if 2gig file limit is hit */ |