A patch for sunrpc

Roland McGrath roland@frob.com
Fri Mar 31 17:35:00 GMT 2000


> On Fri, Mar 31, 2000 at 08:24:15PM -0500, Roland McGrath wrote:
> > It seems to me that if you are going to diddle with this then what you
> > should do is make it more generally robust, i.e. grow the table.
> > It already copes with using poll instead or in addition to select
> > when the highest fd reaches FD_SETSIZE.  I'd also like to know why
> 
> I have thought about it. The main problem is struct, fd_set. How do you
> change that at the runtime?

Well, it's already the case that fd_set can have variable size if
everything supports it.  But anyway, you don't have to.  You can just use
poll, and that is what the sunrpc code already does (it tests fd's against
FD_SETSIZE).  It uses getdtablesize to size another table, which is a
dubious prospect because in all current systems getdtablesize returns the
soft resource limit (RLIMIT_NOFILE), which the program might increase with
setrlimit after the first call into the rpcsvc stuff.


More information about the Libc-hacker mailing list