syslog(LOG_ERR, "failed to write a pid file: %m");
for (;;) {
+#ifdef __minix
+ /*
+ * MINIX 3 does not yet support SA_NOCLDWAIT. Cleaning
+ * up zombies this way is not perfect, but at least it
+ * prevents accumulation of zombies over time.
+ */
+ while (waitpid(-1, NULL, WNOHANG) > 0)
+ ;
+#endif /* __minix */
if (poll(fds, n, INFTIM) == -1) {
if (errno == EINTR)
continue;
sa.sa_handler = toolong;
(void) sigaction(SIGALRM, &sa, NULL);
sa.sa_handler = sigurg;
-#if !defined(__minix)
(void) sigaction(SIGURG, &sa, NULL);
/* Try to handle urgent data inline */
sizeof(int)) < 0)
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
#endif
-#endif /* !defined(__minix) */
#ifdef F_SETOWN
if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1)
}
(void) close(pdata);
pdata = s;
-#if !defined(__minix)
switch (from.su_family) {
case AF_INET:
#ifdef IP_TOS
break;
#endif
}
-#endif /* !defined(__minix) */
/* Set keepalives on the socket to detect dropped conns. */
#ifdef SO_KEEPALIVE
keepalive = 1;