]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3824] Spurious "ntpd: daemon failed to notify parent!" logged at event_sync.
authorDave Hart <hart@ntp.org>
Fri, 2 Jun 2023 23:42:10 +0000 (23:42 +0000)
committerDave Hart <hart@ntp.org>
Fri, 2 Jun 2023 23:42:10 +0000 (23:42 +0000)
bk: 647a7e521P8r02gG1kihRFrWb9tOeQ

ChangeLog
ntpd/ntp_proto.c
ntpd/ntpd.c

index 8e34d2a966967d8143214c12a5cfe88baa6837f7..e906d9677fa2bf6f6b0abc5ce98798ec91ecf06f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+---
+* [Bug 3824] Spurious "ntpd: daemon failed to notify parent!" logged at
+             event_sync.  Reported by Edward McGuire.  <hart@ntp.org>
+
 ---
 (4.2.8p16) 2023/05/31 Released by Harlan Stenn <stenn@ntp.org>
 
index ea72dd3d37ae004b5dfe76a295a15dab0853220a..f2c59238432ae6979a31933df972624d42116260 100644 (file)
@@ -2987,8 +2987,9 @@ clock_update(
                         */
 #ifdef HAVE_WORKING_FORK
                        if (daemon_pipe[1] != -1) {
-                               if (2 != write(daemon_pipe[1], "S\n", 2))
-                                       msyslog(LOG_ERR, "ntpd: daemon failed to notify parent!");
+                               if (2 != write(daemon_pipe[1], "S\n", 2)) {
+                                       msyslog(LOG_ERR, "daemon failed to notify parent ntpd (--wait-sync)");
+                               }
                                close(daemon_pipe[1]);
                                daemon_pipe[1] = -1;
                                DPRINTF(1, ("notified parent --wait-sync is done\n"));
index f05924de7842d0cfd9a806e633693bce7cd6d0af..868f7a9c8068c74ad75e3ebb17fb24d6570268b9 100644 (file)
@@ -1450,8 +1450,10 @@ int scmp_sc[] = {
 #if defined(SYS_WINNT)
        ntservice_isup();
 #elif defined(HAVE_WORKING_FORK)
-       if ((daemon_pipe[1] != -1) && (2 != write(daemon_pipe[1], "R\n", 2))) {
-               msyslog(LOG_ERR, "ntpd: daemon failed to notify parent!");
+       if (daemon_pipe[1] != -1) {
+               if (2 != write(daemon_pipe[1], "R\n", 2)) {
+                       msyslog(LOG_ERR, "daemon failed to notify parent ntpd after init");
+               }
                close(daemon_pipe[1]);
                daemon_pipe[1] = -1;
        }