lkml.org 
[lkml]   [1997]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: fork: out of memory
From
Date
alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> > Hmm ... FreeBSD gets round this by allowing you to
> > redefine FD_SETSIZE in your own programs before you
>
> You can do this in Linux. And like in BSDI it doesnt work
> for all cases. the fd_set size is compiled into some libc
> functions (notably NIS stuff). You use fd 0-4093 and nis
> stops working cos its fd is outside its fdset size.
>
> glibc knows how to handle this right

No, it doesn't. e.g. the DNS resolver will stop working. I grepped 4-5
other usages of select in the sources (including the sunrpc code).
glibc limits you to 1024fds in the fd_set defintition anyways. The
correct way is to either use poll() everwhere or use dynamically allocated
fd_sets internally (that's easy with gcc's dynamic local arrays or
with alloca())

-Andi

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.103 / U:2.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site