Hi,
I need to determine the number of open files in my process - all types of file handles total - sockets, files, everything.
Does this work reliably for that purpose?
int num_open = 0; /* number of open files? */
kinfo_file *inf = kinfo_getfile(getpid(), &num_open);
if ( inf ) {
free(inf);
}
Thanks,
=Ed