On Aug 24, 2004, at 12:41 PM, Charles Mills wrote:

> Is there an easy way to find out the number of open files held by a 
> process (using C or Ruby)?
>
I think the way I phrased the question above makes the problem sound 
harder than it is...
I am unittesting a C extension.  The extension opens files using 
open().  I want to make sure that the extension closes all the files it 
opens (when errors occur or whatever).

So I figured getting a count of open file descriptors before the 
extension code is called and after it is finished would enable me to do 
this.

-Charlie