In init() there was code iterating over all of the possible file
descriptors in a svc_fdset. fdsets are limited to FD_SETSIZE. This
caused coredumps on FreeBSD 10, and possibly other hidden issues.
Moving to poll(), rather than select() would be better, but is a bigger
job. For now, just limit to the FD_SETSIZE that select() requires.
(void)endnetconfig(handlep);
#endif /* OPT_TLI */
// now figure out what fd the rpc package is using
- int maxfds = _tt_global->maxfds();
- for (int i=0; i < maxfds; i++) {
+ for (int i=0; i < FD_SETSIZE; i++) {
if (FD_ISSET(i, &svc_fdset)) {
_rpc_fd = i;
}