File descriptor number disagreement

Nick Burrett nick at
Wed Jun 8 10:50:11 PDT 2005

Peter Naulls wrote:
> FD_BITS in UnixLib is 256, yet SUL only allocates room for 54 file
> descriptors.  This causes potential badness in select(), although
> possibly nowhere else.
> The obvious fix it to make a new SUL verision which allocates more.  Any
> comments?

Since file descriptors can be made arbitarily, it would probably be a 
good idea i.e.
   *program 254>&1

I wonder if there is any range checking to ensure that this fails:
   *program 2393>&1

More information about the gcc mailing list