This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


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

Re: select() on more than 64 fds


On Thu, Sep 07, 2000 at 05:55:47PM -0700, MarketLogix wrote:
>
>Has this changed since b20.1 ?
>
>Cause it sure mattered there !
>
>I was unable to mind more than 32 fds w/select until I
>called setdtablesize(256) !

Sorry, but you must be imagining things.  Look at the source code.

I *think* that in B20.1, you may have had to call setdtablesize to
*open* more fds but FD_SETSIZE was set to 64.  If you tried to use more
than 64 fds in select you were out of luck.

In 1.1.4, the fd table is extended automatically.

There is experimental code in select.cc in 1.1.4 for dealing with more
than 64 fds but, unfortunately, it has been pointed out that it is broken.
It's fixed in the snapshots, though.

To increase the number of fds available for select just have to define
FD_SETSIZE before including sys/types.h.

However, you will eventually hit a hard Windows limit.

For more information, look at sys/types.h, and in the cygwin source
dtable.cc, syscalls.cc, and, of course, select.cc.

>My assumption was that this expands some per process fdtable
>within cygwin1.dll. Is this no longer the case w/ v1.1.x ?
>I still use it here only since I haven't bothered taking it out.

It still works but it should no longer be necessary.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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