Re: max # of file handles
Re: max # of file handles
- Subject: Re: max # of file handles
- From: Scott Ribe <email@hidden>
- Date: Sat, 19 Apr 2008 17:52:42 -0600
- Thread-topic: max # of file handles
> I'm trying to debug a Cocoa app that occasionally exceeds the max
> allowable number of file handles open and I'm wondering if there's a
> way to query how many are actually open. I haven't found anything in
> the docs. Does anyone know where I might find a reference to such a
> function?
I don't think there's anything in Cocoa for that; you have to muck around at
the BSD level. You could iterate over all possible file descriptor numbers
using fstat, to discover which ones are valid open file descriptors.
It wouldn't surprise me if BSD offers a better way, but I don't know it.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden