+Skip over bogus EINTR error on select when arp checking for a
+different address from what we already have. This should not
+happen, so a better fix is probably needed.
+
dhcpcd-3.1.6
--skiproutes has been added for no fork users so that we know if we
can delete the route at a later date.
FD_ZERO (&rset);
FD_SET (iface->fd, &rset);
- errno = 0;
- if ((s = select (FD_SETSIZE, &rset, NULL, NULL, &tv)) == -1) {
- if (errno != EINTR)
- logger (LOG_ERR, "select: `%s'", strerror (errno));
+ if ((s = select (iface->fd + 1, &rset, NULL, NULL, &tv)) == -1) {
+ /* If anyone can explain why we get an EINTR when probing
+ * for an ip address we don't have assigned, I'd like to here
+ * from you - hopefully with a patch or info on how to fix.
+ * Note, no signal is really received, so it's probably a
+ * bogus error as we've done something wrong somewhere.
+ * Until then, we ignore it and continue. Or timeout an flood
+ * protection should be robust enough to cater for this.
+ * This happens on both Linux and FreeBSD. */
+ if (errno == EINTR)
+ continue;
+
+ logger (LOG_ERR, "select: `%s'", strerror (errno));
break;
}
}