This is the mail archive of the cygwin 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]
Other format: [Raw text]

FD_SETSIZE and sizeof(fd_set)


I am running into a problem with the fd_set structure that someone may know the answer to. 

I would like to be able to call select() on more than 64 open files, so I have done the following:

1)   the include section of the program has the code:

#undef FD_SETSIZE
#define FD_SETSIZE 256
#include <sys/types.h>

2) however, when I query the size of the fd_set structure, sizeof(fd_set) return 8 bytes. 

This obviously breaks things when the fd is greater than 64.

Is there a proper way of supporting more than 64 open files in a process? I am guessing there is an easy answer -- if not, I can supply sample code that shows the problem.

Steve Bardwell





--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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