[OT] select and sysread problem on solaris

Andy Armstrong andy at hexten.net
Thu Sep 11 02:36:55 BST 2008

On 11 Sep 2008, at 02:12, Paul Johnson wrote:
> Is my assumption correct that if select tells you there is something  
> to
> be read then there should be something there to be read?  Can anyone
> think of any other possibilities?

210 + ~30 = ~240 - which is getting close to 255. Since select uses a  
fixed bit field to represent filenos there's an upper limit on the  
filenos you can select on. What does this print?

#include <sys/select.h>
#include <stdio.h>

int main( void ) {
     printf( "%d\n", FD_SETSIZE );
     return 0;

Andy Armstrong, Hexten

More information about the london.pm mailing list