> On 7 Feb 2015, at 23:26, Jerry Krinock <je...@ieee.org> wrote:
> 
> I need a method which will give me the paths of all files which the current 
> OS X process (*) has open.  Yes, this is for a benevolent hack and no, I am 
> not sandboxed.
> 
> I’m considering using getpid() and passing the result to /usr/sbin/lsof with 
> a -p option.  This works very fast in Terminal.app, but I’m hoping for 
> something less fragile (lsof has lots of weird options including a timeout) 
> and more lightweight.
> 
> 
The source for lsof is available if you want to dig through it:

http://www.opensource.apple.com/source/lsof/lsof-53/lsof/

Jonathan
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to