[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Issue with Mint 1.19 and Litchi (maybe solved)




Am 07.02.2015 um 15:29 schrieb Helmut Karlowski:

So the maximum handle to listen to is limited to the number of bits in the argument to select (64 on cygwin).

FD_SETSIZE doesn't neccessarily need to be equal to the number of bits of a machine word and it doesn't need to be of fixed size as well (the xxxfds arguments to select() are pointers).

On Linux, for example, it is 1024 (and cannot be easily changed), on many other OS' like AIX (=65534) and Solaris, it can. Usually (at least with the OS's I know), FD_SETSIZE equals to OPEN_MAX which means you can always monitor as many file descriptors with select() as you are able to open (just as it was with MiNT before the limit of 32 handles was lifted).

Of course it's a waste of resources to always pass huge arrays to the OS when you don't need them. In AIX and Solaris for example, you just define FD_SETSIZE to the value you need before including the standard header.