Re: OPEN_MAX/FOPEN_MAX is dynamic?

Ulrich Drepper (drepper@cygnus.com)
19 Oct 1998 16:46:31 -0700


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   `------------------------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/