FD_SETSIZE and sizeof(fd_set)
Steven Bardwell
SBardwell@lbmsys.com
Wed Jun 22 23:20:00 GMT 2016
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
More information about the Cygwin
mailing list