Re: How to list all files opened by a process on the Mac OS X?
Re: How to list all files opened by a process on the Mac OS X?
- Subject: Re: How to list all files opened by a process on the Mac OS X?
- From: Alexander von Below <email@hidden>
- Date: Tue, 24 Jan 2006 22:12:31 +0100
Am 24.01.2006 um 21:51 schrieb Mike Smith:
To start with, why are you interested in this information? What do
you expect to do with it?
Glad you asked!
I would like to know which files of a certain pattern (say:
Extension) are opened by other processes, and I am interested in the
full path. Not much else really, maybe the process ID that has opened
it. Preferably I would like to do it without root privileges, because
I am actually only interested in processes owned by the current user.
Right now, I am calling lsof from my code, and just parse the output.
This seems like a pretty wasteful way of achieving what I need.
It would be great to know if there even is a smarter way of doing
this. I did succeed in getting a file list from sysctl, but was
unsuccessful in reading the corresponding vnodes (I assume that I was
I need to obtain the full path)
Thanks a lot
Alex
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden