On Sun, Jun 02, 2013 at 03:57:28PM -0700, William Ahern wrote: > On Sun, Jun 02, 2013 at 02:05:20PM -0600, J. Scott Dorr wrote: > > Yeah, FD_SETSIZE is supposed to be informative, not a tuning parameter. > > > > Under POSIX, yes. But some implementations allow the user to define this > macro, including OS X, OpenBSD, and Solaris. It looks like Linux/glibc > stopped allowing this--or at least stopped making it easy--from what I can > tell of the header file in Ubuntu. > > It's a bad idea, of course. Though OS X allows the user to set FD_SETSIZE, > you still need other magic for the kernel to accept the larger value. And I
What magic, exactly? This interface originated in BSD Unix, and FD_SETSIZE has always been adjustable by the application. The problem is when one runs into library interfaces that want to pass fd_sets around; there, if you don't use the same FD_SETSIZE as they did, you lose. Such interfaces are broken, but they exist. But if there is a problem with the kernel (which I doubt) it is a new problem and whoever caused it should fix it. On the other hand it is almost always a very bad idea to use select() in new code, for performance reasons. Even poll is much better. Thor *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
