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 |