Sun's fopen() fd limit of 256



I'm not sure if everyone is aware, but Sun has a long standing issue where fopen
 will fail if the # of open fds is greater than 0xff. The underlying reason is 
that they never updated their FILE struct to change the UNIX fd from an unsigned
 char. Only if you build your app as _LP64 does it finally use an int for the 
fd.

In order to work around this bug we've maintained our own imitation f* API for 
reading/writing that does not have this 256 fd limit.

Is there any benefit to providing a full GLib fopen/fread/fwrite/etc API which 
provides its own implementation if the system implementation has an fd 
limitation? The configure script could detect this and enable it if necessary. 
Just wondering if anyone else had run into this problem...

Thanks,

Andrew Paprocki
Bloomberg LP






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