cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: fd_set beyond 1024 problem

From: Robert Iakobashvili <coroberti_at_gmail.com>
Date: Wed, 30 May 2007 11:43:38 +0300

On 5/30/07, Daniel Stenberg <daniel_at_haxx.se> wrote:

> I've realized that we use fd_set internally, even when we use poll() (in
> the
> select()-"simulating" function).
>
> If we raise the maximum number of filedescriptors above 1024 and use more
> than
> 1024 in a libcurl-using application, the FD_SET(), FD_CLEAR() etc macros
> (and
> even the select() function) write beyond the boundary of the fd_set
> variable
> and all sorts of funny things happen.
>
> It isn't clear to me what the portable way of raising this limit is for
> fd_set, but I feel a strong urge to fix this issue.
>

We added such file as the first header to all files and it works for linux.
http://curl-loader.svn.sourceforge.net/viewvc/curl-loader/trunk/curl-loader/fdsetsize.h?view=markup

-- 
Sincerely,
Robert Iakobashvili,
coroberti %x40 gmail %x2e com
...........................................................
http://curl-loader.sourceforge.net
A web testing and traffic generation tool.
Received on 2007-05-30