* [Bug 3517] Reducing build noise <perlinger@ntp.org>
* [Bug 3516] Require tooling from this decade <perlinger@ntp.org>
- patch by Philipp Prindeville
+* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code <perlinger@ntp.org>
+ - patch by Philipp Prindeville
* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings <perlinger@ntp.org>
- patch by Philipp Prindeville
* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() <perlinger@ntp.org>
# if defined(HAVE_WORKING_FORK)
long wait_sync = 0;
int pipe_fds[2];
- int rc;
int exit_code;
# endif /* HAVE_WORKING_FORK*/
# ifdef SCO5_CLOCK
# ifdef HAVE_WORKING_FORK
detach_from_terminal(pipe_fds, wait_sync, logfilename);
-# endif /* HAVE_WORKING_FORK */
+# endif /* HAVE_WORKING_FORK */
}
# ifdef SCO5_CLOCK
ntservice_isup();
#endif
-# ifdef HAVE_IO_COMPLETION_PORT
+# ifndef HAVE_IO_COMPLETION_PORT
+ BLOCK_IO_AND_ALARM();
+ was_alarmed = FALSE;
+# endif
for (;;) {
#if !defined(SIM) && defined(SIGDIE1)
if (signalled)
finish_safe(signo);
#endif
+# ifdef HAVE_IO_COMPLETION_PORT
GetReceivedBuffers();
-# else /* normal I/O */
- BLOCK_IO_AND_ALARM();
- was_alarmed = FALSE;
-
- for (;;) {
-#if !defined(SIM) && defined(SIGDIE1)
- if (signalled)
- finish_safe(signo);
-#endif
+# else /* normal I/O */
if (alarm_flag) { /* alarmed? */
was_alarmed = TRUE;
alarm_flag = FALSE;