This is the mail archive of the
mailing list for the Cygwin project.
FD_SETSIZE and sizeof(fd_set)
- From: Steven Bardwell <SBardwell at lbmsys dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Wed, 22 Jun 2016 22:19:20 +0000
- Subject: FD_SETSIZE and sizeof(fd_set)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp dot mailfrom=SBardwell at lbmsys dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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:
#define FD_SETSIZE 256
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple