• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Get all open files of one process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get all open files of one process


  • Subject: Get all open files of one process
  • From: Chen Ben <email@hidden>
  • Date: Fri, 23 Dec 2005 13:36:10 +0800

Hi all!

I am searching for a method to get all open file names and pathes of
one process, just like the Activity Monitor does.

I have tried the sysctl function. I used the CTL_KERN and KERN_FILE
keyword, but I don't know how to get the file path names from the
return value. I found that even if I include the file <sys/vnode> or
<sys/file>, when I write the following code:

struct vnode node;
or:
struct file afile;

the compiler tell that "field node/afile has incomplete type"...

I wonder if this is the right way and how to achieve my goal.

looking forward you reply!

--
Ben Chen, Apple Technology Lab of Software Engineering School, Tongji University
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: R: Running out of VM
  • Next by Date: Re: KVO one-step listening but two-step notifying?
  • Previous by thread: Re: R: Running out of VM
  • Next by thread: Keyboard Localizations
  • Index(es):
    • Date
    • Thread