Re: How to list all files opened by a process on the Mac OS X?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Glad you asked! Thanks a lot Alex = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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? 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) This email sent to site_archiver@lists.apple.com
participants (1)
-
Alexander von Below