I'm trying to debug a file descriptor leak in a program. I'm looking at Activity Monitor's "Open Files and Ports" window in hopes of gleaning some information.
I see several types of entries. Here's a sample:
cwd / txt /Applications/Utilities/Activity Monitor.app/Contents/MacOS/Activity Monitor 0 /dev/null 1 /dev/null 2 /dev/null 3 4 5 6 7 ->0x1c8e9b47ad822e5b
I believe that I understand several things about this format:
- In general, a first line tells the file descriptor and the second line shows where it points:
cwd /means that the current directory of the app is /
txt /Applications/.../Activity Monitormeans that "Activity Monitor" is mapped into memory without having an open file descriptor
0 /dev/nullmeans that file descriptor 0 is associated to /dev/null
7 ->0x1c8e9b47ad822e5bmeans that file descriptor 7 is associated to a file-like object that doesn't have a persistent name (?)
But what about file descriptors 3 through 6? What are they associated to?