On Feb 16, 2011, at 3:59 PM, Jerry Krinock wrote:
> On 2011 Feb 16, at 12:05, Ken Thomases wrote:
> 
>> If it's actually an application, and you can target 10.6, use 
>> -[NSRunningApplication executableArchitecture].
> 
> Thanks, but need 10.5 support.
> 
> I suppose I could spend hours searching all three of Apple's open-source 
> sites:
> 
> http://opensource.apple.com/
> http://www.apple.com/opensource/
> http://www.macosforge.org/
> 
> to see if I could find the some code that fills in a kinfo_proc, but since 
> the answer may in the end be "no", I'm going to forget this and use 'ps -ax 
> -o flags' as I originally suggested.  At least I have a proof-of-concept demo 
> with that.

`top` knows about 64-bit processes and is available at opensource.apple.com. 
Try libtop_p_cputype() in libtop.c.

Be warned that top often does things that are not supported. You should call 
-[NSRunningApplication executableArchitecture] on 10.6+ and do whatever top 
does on 10.5 only.


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to