This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: OPEN_MAX/FOPEN_MAX is dynamic?


hjl@lucon.org (H.J. Lu) writes:

> Ulrich, we need to address it in glibc 2. Also it may have impact
> on __fd_set. It should be large enough to cover most if not all
> cases. I am thinking 8192 or even larger. We can do the conversion
> to the kernel fd size at the run-time.

As Andreas said glibc is almost free of select() calls.  Only stupid
RPC code is resisting and probably cannot be fixed without changing
the API.

The "dynamic" adaption of the __fd_set size can be very easily done by
adding #ifndef __FD_SETSIZE around the definition in bits/types.h to
allow the user to define this value.  This would be trivial.

Unfortunately it is not possible to define __FD_SETSIZE as something like

	#define __FD_SETSIZE (__magically_get_value_from_kernel ())

since it must be a compile time constant.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]