3 ms·
On FreeBSD's select(2) man page, the NOTES section has the much friendlier > The default size of FD_SETSIZE is currently 1024. In order to accommodate programs
by toast0 6y ago
On FreeBSD's select(2) man page, the NOTES section has the much friendlier
> The default size of FD_SETSIZE is currently 1024. In order to accommodate programs which might potentially use a larger number of open files with select(), it is possible to increase this size by having the program define FD_SETSIZE before the inclusion of any header which includes <sys/types.h>.
Although, if you link to a library which uses select and doesn't check that fds it uses are valid with the FD_SETSIZE it was compiled with, you're still in for a bad time, as suggested in the article. And still, probably use something better than select.