<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Eric S. Raymond pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/ba3559e175bd3efeb04a8ccf3f35a11a0a2551ed">ba3559e1</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2016-03-21T11:22:07-04:00</i>
</div>
<pre class='commit-message'>Forward-port from Classic: [Bug 2814] msyslog deadlock when signaled.</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
NEWS
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
ntpd/ntpd.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/ba3559e175bd3efeb04a8ccf3f35a11a0a2551ed#diff-0'>
<strong>
NEWS
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/NEWS
</span><span style="color: #000000;background-color: #ddffdd">+++ b/NEWS
</span><span style="color: #aaaaaa">@@ -8,14 +8,16 @@ on user-visible changes.
</span> 
 == Repository head ==
 
<span style="color: #000000;background-color: #ffdddd">-The following reflect forward-ported fixes from Classic:
</span><span style="color: #000000;background-color: #ddffdd">+The following fixes have been forward-ported from Classic:
</span> 
 [Bug 2772] adj_systime overflows tv_usec
<span style="color: #000000;background-color: #ddffdd">+[Bug 2814] msyslog deadlock when signaled.
</span> [Bug 2829] Look at pipe_fds in ntpd.c
 [Bug 2887] fudge stratum only accepts values [0..16].
 [Bug 2937] (NTPQ) nextvar() missing length check
<span style="color: #000000;background-color: #ffdddd">-[Bug 2958] ntpq: fatal error messages need a final newline. Craig Leres.
</span><span style="color: #000000;background-color: #ddffdd">+[Bug 2958] ntpq: fatal error messages need a final newline.
</span> [Bug 2965] Local clock didn't work since 4.2.8p4.
<span style="color: #000000;background-color: #ddffdd">+[Bug 2969] Segfault from ntpq/mrulist when looking at server with lots of clients
</span> 
 == 2016-03-15: 0.9.2 ==
 
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/ba3559e175bd3efeb04a8ccf3f35a11a0a2551ed#diff-1'>
<strong>
ntpd/ntpd.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntpd.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntpd.c
</span><span style="color: #aaaaaa">@@ -45,6 +45,13 @@ extern bool sandbox(const bool droproot,
</span>               const char *chrootdir,
                    bool want_dynamic_interface_tracking);
 
<span style="color: #000000;background-color: #ddffdd">+#if !defined(SIM) && defined(SIGDIE1)
+static volatile bool signalled = false;
+static volatile int signo      = 0;
+/* In an ideal world, 'finish_safe()' would declared as noreturn... */
+static void            finish_safe     (int);
+#endif
+
</span> #ifdef SIGDANGER
 # include <ulimit.h>
 #endif /* SIGDANGER */
<span style="color: #aaaaaa">@@ -957,6 +964,10 @@ static void mainloop(void)
</span> 
 # ifdef HAVE_IO_COMPLETION_PORT
        for (;;) {
<span style="color: #000000;background-color: #ddffdd">+#if !defined(SIM) && defined(SIGDIE1)
+               if (signalled)
+                       finish_safe(signo);
+#endif
</span>           GetReceivedBuffers();
 # else /* normal I/O */
 
<span style="color: #aaaaaa">@@ -964,6 +975,10 @@ static void mainloop(void)
</span>   was_alarmed = false;
 
        for (;;) {
<span style="color: #000000;background-color: #ddffdd">+#if !defined(SIM) && defined(SIGDIE1)
+               if (signalled)
+                       finish_safe(signo);
+#endif
</span>           if (alarm_flag) {       /* alarmed? */
                        was_alarmed = true;
                        alarm_flag = false;
<span style="color: #aaaaaa">@@ -1082,8 +1097,8 @@ static void mainloop(void)
</span> /*
  * finish - exit gracefully
  */
<span style="color: #000000;background-color: #ffdddd">-void
-finish(
</span><span style="color: #000000;background-color: #ddffdd">+static void
+finish_safe(
</span>   int sig
        )
 {
<span style="color: #aaaaaa">@@ -1102,6 +1117,16 @@ finish(
</span>   peer_cleanup();
        intercept_exit(0);
 }
<span style="color: #000000;background-color: #ddffdd">+
+void
+finish(
+       int     sig
+       )
+{
+       signalled = true;
+       signo = sig;
+}
+
</span> #endif    /* !SIM && SIGDIE1 */
 
 
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/ba3559e175bd3efeb04a8ccf3f35a11a0a2551ed">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/ba3559e175bd3efeb04a8ccf3f35a11a0a2551ed"}}</script>
</p>
</div>
</body>
</html>