>Why go to all this trouble when there is a system call to do it (at >least in BSD... Because there *isn't* such a call in BSD. There's no "getdtablemax()" in 4.3-reno or previous releases. Maybe you have some Mutant BSD From Hell with "getdtablemax()", but if so, your system isn't representative....