Duane Wessels wrote:
> A problem with _SC_OPEN_MAX occurs on Linux. According to Jordan
> Mendelson (jordy@wserv.com):
>
> Linus has stated that OPEN_MAX will not change in kernel
> headers and it is unreliable to use it to check and Glibc puts
> in it's own headers which also force the configure script to
> default to 256. getrlimit() provides a reliable way to get the
> maximum file descriptors.
There is a big difference between OPEN_MAX which is a constant, and
sysconf(_SC_OPEN_MAX) which is a "system" call. sysconf(_SC_OPEN_MAX)
uses getrlimit on Linux, and on those systems (libc versions) it doesn't
it is generally unsafe to use more file descriptors.
/Henrik
Received on Tue Jul 29 2003 - 13:15:57 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:05 MST