cURL / Mailing Lists / curl-library / Single Mail


Re: fd_set beyond 1024 problem

From: Daniel Stenberg <>
Date: Wed, 30 May 2007 11:19:16 +0200 (CEST)

On Wed, 30 May 2007, Robert Iakobashvili wrote:

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

Yeah, the joys of focusing on a single system... :-)

Unfortunately, that soltion only works for Linux and we want maximum
portability. It seems at least Solaris, OSF/1, HPUX and IRIX all support
defining FD_SETSIZE manually at compile time. I wonder why Linux/glibc broke
that ability...

But really, we need to:

1) swap how we work internally when poll() is around so that we won't have
    this problem on all systems that have poll() (= the majority)

2) deal with fd_set for the remaining select()-based systems, and it would
    probably involve a configure check for what method to use. And even then
    we can only give means on how to raise the bar, it would still need to be
    set to a compile-time fixed value.

  Commercial curl and libcurl Technical Support:
Received on 2007-05-30