Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any known way to find the "owner"....



This is good. I want to do it from within my app so I can look at the
source of lsof to see how it does it.

part of the way lsof does it is with the sgid bit. lsof is designed so that it is moderately easy for a program to parse the results. Unless you need root for some other reason, it is probably better to invoke lsof then write the relatively simple code yourself. Without root, the code in lsof will only find information about files opened in the current process.

Hope this helps
Eric
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.