+* [Bug 1320] Log ntpd's initial command-line paprameters.
(4.2.7p320) 2012/11/12 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 969] Clarify ntpdate.html documentation about -u and ntpd.
* [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM
# endif /* !DEBUG */
#endif /* !SIM && !SYS_WINNT */
+int saved_argc;
+char ** saved_argv;
+
#ifndef SIM
int ntpdmain (int, char **);
static void set_process_priority (void);
else
umask(022);
# endif
+ saved_argc = argc;
+ saved_argv = argv;
progname = argv[0];
initializing = TRUE; /* mark that we are initializing */
parse_cmdline_opts(&argc, &argv);
}
msyslog(LOG_NOTICE, "%s: Starting\n", Version);
+ {
+ int i;
+ char buf[4096];
+ char *cp = buf;
+
+ for (i = 0; i < saved_argc ; ++i) {
+ snprintf(cp, sizeof buf - (cp - buf),
+ "%s%s", &" "[(cp == buf)], saved_argv[i]);
+ cp += strlen(cp);
+ }
+ msyslog("Command line: %s", buf);
+ }
+
/*
* Install trap handlers to log errors and assertion failures.
* Default handlers print to stderr which doesn't work if detached.