Get all open files of one process
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