On Fri, 30 Nov 2007, Esh, Thomas D (Tom) wrote:
We are using the c-client library in a process that has > 1024 file descriptors and are running into problems because the library uses select instead of poll. We are running on linux which defines the max fd_set to be 1024.
At least on BSD, you can redefine FD_SETSIZE to be a larger value. It looks like on Linux, you may have to include types.h first, then redefine __FD_SETSIZE, then include select.h.
Is there a reason that the c-client library doesn't use poll?
poll() appeared about 10 years ago. The original version of c-client was written 20 years ago. It is ported to systems which do not have poll(). I also see a warning in the poll man page on some systems that it doesn't support all types of file descriptors.
You are the first person ever to have reported encountering this issue. I don't see much point to rewriting the code that uses select() to accomodate a very infrequent case, especially as it may break things for other sites.
There are only a handful of select() calls in c-client; probably all in env_unix.c and tcp_unix.c. So it shouldn't be a serious problem to change it in your system and/or redefine FD_SETSIZE.
-- Mark -- http://panda.com/mrc Democracy is two wolves and a sheep deciding what to eat for lunch. Liberty is a well-armed sheep contesting the vote. _______________________________________________ Imap-uw mailing list Imap-uw@u.washington.edu https://mailman1.u.washington.edu/mailman/listinfo/imap-uw