getdtablesize (Re: How to divorce a process ...)

Felix Lee flee at psuvax1.cs.psu.edu
Tue Jun 12 08:08:40 AEST 1990


>Modern Unixes have a call to tell you the # of file descriptors:
>	count = getdtablesize();

Mmph.  Note that under SunOS 4.1, getdtablesize() can return something
that's less than the number of open files.  File descriptors are now a
resource affected by getrlimit/setrlimit.  getdtablesize returns the
current soft limit on number of file descriptors.  To ensure that all
file descriptors get closed, you should use the hard limit instead.
--
Felix Lee	flee at cs.psu.edu



More information about the Comp.unix.wizards mailing list