On Tue, May 02, 2006 at 09:43:00AM -0400, James Carlson wrote:
> Chris Elving writes:
> > I'm seeking a sponsor for the following change to
> > /usr/src/cmd/cmd-inet/usr.bin/telnet/sys_bsd.c for telnet(1):
> > + int nfds = 0;
> Since we know that tin and tout are 0 and 1 (fixed), the whole thing
> can likely be reduced to just:
> > - if ((c = select(16, &ibits, &obits, &xbits,
> > + if ((c = select(net + 1, &ibits, &obits, &xbits,
> But the bigger question is why this is needed. It'd have to be some
> situation in which telnet was exec'd with the first 16 descriptors
> already open. Does that happen?
Couldn't you just start main() with:
to close any extra file descriptors?
Jonathan Adams, Solaris Kernel Development