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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

getdtablesize/_rpc_dtablesize and Linux kernel


getdtablesize/_rpc_dtablesize in glibc is a mess as far as Linux
kernel is concerned. We have 2 values here:

1. The number of open fds the kernel permits, which getdtablesize ()
will return at the runtime.
2. The number of open fds glibc supports, mainly the size of
fd_set used by glibc.

#1 can be increased by changing NR_OPEN/INR_OPEN in kernel and
recompiling it. However, glibc uses _rpc_dtablesize () which
calls getdtablesize () on the functions, like select (), which
use fd_set. It won't work when _rpc_dtablesize () returns a
value larger than size of fd_set at the runtime. I think glibc
should use the size of fd_set for functions which use it.

BTW, does glibc check NR_OPEN in the kernel source during the build?



-- 
H.J. Lu (hjl@gnu.org)

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