diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-20 18:41:04 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-20 18:41:04 +0100 |
commit | 5b55ab75e27861241981ae447ed3d1b8ad968deb (patch) | |
tree | 61e68ee2da0ea1bb728c3532a119a7f010af2a84 /tools/syslogd.c | |
parent | dffcfa8699c41d9f64b7aee131a32661587ce441 (diff) | |
download | rsyslog-5b55ab75e27861241981ae447ed3d1b8ad968deb.tar.gz rsyslog-5b55ab75e27861241981ae447ed3d1b8ad968deb.tar.xz rsyslog-5b55ab75e27861241981ae447ed3d1b8ad968deb.zip |
debugondemand mode caused backgrounding to fail
This is close to a bug, but I'd consider the ability to background
in this mode a new feature...
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r-- | tools/syslogd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index e03bf4d8..f11808f3 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -904,7 +904,7 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags) * permits us to process unmodified config files which otherwise contain a * supressor statement. */ - if(((Debug || NoFork) && bErrMsgToStderr) || iConfigVerify) { + if(((Debug == DEBUG_FULL || NoFork) && bErrMsgToStderr) || iConfigVerify) { if(LOG_PRI(pri) == LOG_ERR) fprintf(stderr, "rsyslogd: %s\n", msg); } @@ -1644,10 +1644,10 @@ static void doDie(int sig) # define MSG1 "DoDie called.\n" # define MSG2 "DoDie called 5 times - unconditional exit\n" static int iRetries = 0; /* debug aid */ - if(Debug) + if(Debug == DEBUG_FULL) write(1, MSG1, sizeof(MSG1) - 1); if(iRetries++ == 4) { - if(Debug) + if(Debug == DEBUG_FULL) write(1, MSG2, sizeof(MSG2) - 1); abort(); } @@ -2881,7 +2881,7 @@ static rsRetVal mainThread() * is still in its infancy (and not really done), we currently accept this issue. * rgerhards, 2009-06-29 */ - if(!(Debug || NoFork)) { + if(!(Debug == DEBUG_FULL || NoFork)) { close(1); close(2); bErrMsgToStderr = 0; @@ -3072,7 +3072,7 @@ doGlblProcessInit(void) thrdInit(); - if( !(Debug || NoFork) ) + if( !(Debug == DEBUG_FULL || NoFork) ) { DBGPRINTF("Checking pidfile.\n"); if (!check_pid(PidFile)) |