• 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
Re: How to list all files opened by a process on the Mac OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 12:03:39 +0100


Am 24.01.2006 um 11:10 schrieb Jonas Maebe:

Since lsof can do that, you can look at its source. I don't know which Darwin project it's part of though.


I am aware of lsof, but for what I am doing I think lsof is overkill. I thought if sysctl offers an easier and (performance wise) cheaper way, I would love to go with that.

It appears that the sysctl method is deprecated, at least filehead and similar structures are no longer found in the 10.4 SDK. Does someone have more info on this

What I really need is just a very stripped down version of lsof, basically even a slimmed version of dproc.c, but I was so far unable to find documentation on the kread method used there. Maybe that is just a guise for sysctl? If someone would be willing to help me on my way with that it would be great.

The other option would be to call lsof and parse the output, but so far I did not even find an option to limit the output to VREG types. If someone has that, it might help already.

Thanks

Alex
 _______________________________________________
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

References: 
 >Re: How to list all files opened by a process on the Mac OS X? (From: Alexander von Below <email@hidden>)
 >Re: How to list all files opened by a process on the Mac OS X? (From: Alexander von Below <email@hidden>)
 >Re: How to list all files opened by a process on the Mac OS X? (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: How to list all files opened by a process on the Mac OS X?
  • Next by Date: Re: How to list all files opened by a process on the Mac OS X?
  • Previous by thread: Re: How to list all files opened by a process on the Mac OS X?
  • Next by thread: Re: How to list all files opened by a process on the Mac OS X?
  • Index(es):
    • Date
    • Thread