title: How can I programmatically get the list of open file descriptors for a given PID on OS X?
body: <p>Everything I've seen says to use <code>lsof -p</code>, but I'm looking for something that doesn't require a fork/exec.</p>
  
  <p>For example on Linux one can simply walk <code>/proc/{pid}/fd</code>.</p>