From 5cccc2d5af152f67e5bb77b41403f74403926235 Mon Sep 17 00:00:00 2001 From: fredrik Date: Thu, 26 Jan 2006 02:05:27 +0000 Subject: [PATCH] Being stupid... git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@579 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index 1670c5e..1c19101 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -371,13 +371,13 @@ int main(int argc, char **argv) char *configfile; char *pidfile; FILE *pfstream, *confstream; - int delay; + int delay, immsyslog; struct module *mod; struct timer *timer, *ntimer; struct child *child; double now; - nofork = 0; + immsyslog = nofork = 0; syslogfac = LOG_DAEMON; configfile = NULL; pidfile = NULL; @@ -425,8 +425,7 @@ int main(int argc, char **argv) nofork = 1; break; case 's': - logtosyslog = 1; - logtostderr = 0; + immsyslog = 1; break; case 'h': case ':': @@ -438,6 +437,11 @@ int main(int argc, char **argv) } setlocale(LC_ALL, ""); initlog(); + if(immsyslog) + { + logtosyslog = 1; + logtostderr = 0; + } signal(SIGPIPE, SIG_IGN); signal(SIGHUP, handler); signal(SIGINT, handler); -- 2.11.0