On OS/2 this function assumes there is a max of 16K file handles open in the system.
The OS/2 control program doc says the maximum default is 50 for a process.
It can be queried with
APIRET rc = DosSetRelMaxFH(PLONG pcbReqCount, PULONG pcb CurMaxFH);
pcbReqCount is the signed number to be added or subtracted to the current max
file handle count for the process. Use 0 to query.
PULONG is a pointer to a ULONG where the current max for the process is returned.
The max can also be set in an absolute manner using
APIRET rc = DosSetMaxFH(ULONG count);
FYI this is in mozilla/nsprpub/pr/src/io/prfile.c
Created attachment 116430 [details] [diff] [review]
Here's an implementation of PR_GetSysfdTableMax and PR_SetSysfdTableSize for
Comment on attachment 116430 [details] [diff] [review]
Dude, you are returning NO_ERROR on success rather than the number of file
Created attachment 127250 [details] [diff] [review]
The right fix :)
I shouldn't even be checking RC. This API actually can't fail.
wtc, could you please check this into NSPR?
Patch checked into the NSPR trunk (NSPR 4.4.1) and
NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.5a).