Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filename or full path from file descriptor or inode



On Jul 20, 2007, at 11:07 AM, David Hoerl wrote:
I am trying to find out why my app has so many file descriptors open at some point.

Is there a straight forward way to get an ascii string with the filename and/or path given just a file descriptor? I can fstat the descriptor, so I can get a inode.

The canonically correct way to do this would be to remember the names of the files you have opened at the time you opened them.


Alternately, you could use lsof, and it would report the files open (by name) by your process.

-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >filename or full path from file descriptor or inode (From: David Hoerl <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.