From: fredrik Date: Thu, 26 Jan 2006 02:05:27 +0000 (+0000) Subject: Being stupid... X-Git-Tag: 0.1~52 X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=5cccc2d5af152f67e5bb77b41403f74403926235 Being stupid... git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@579 959494ce-11ee-0310-bf91-de5d638817bd --- 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);