From: Dave Hart Date: Mon, 10 Oct 2011 04:49:18 +0000 (+0000) Subject: [Bug 2028] ntpd -n (nofork) redirects logging to stderr. X-Git-Tag: NTP_4_2_7P221~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb7c45c96dc0282eff30f33fd78a370e34d4668b;p=thirdparty%2Fntp.git [Bug 2028] ntpd -n (nofork) redirects logging to stderr. bk: 4e92794ewedJBmCVR8e1ZMdncfyDDg --- diff --git a/ChangeLog b/ChangeLog index 0fd4e06b3..d2ecde554 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ * [Bug 2025] Switching between daemon and kernel loops can doubly- correct drift +* [Bug 2028] ntpd -n (nofork) redirects logging to stderr. * Documentation updates from Dave Mills. (4.2.7p220) 2011/10/05 Released by Harlan Stenn * [Bug 1945] mbg_gps166.h use of _TM_DEFINED conflicts with MS VC. diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 42cbf2477..070bbf1d1 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -487,11 +487,8 @@ ntpdmain( change_logfile(logfilename, FALSE); } else { logfilename = NULL; - if (nofork) { - msyslog_term = FALSE; - syslogit = FALSE; - change_logfile("stderr", FALSE); - } + if (nofork) + msyslog_term = TRUE; } msyslog(LOG_NOTICE, "%s\n", Version);