Re: Talking to the Dock
Re: Talking to the Dock
- Subject: Re: Talking to the Dock
- From: Sailor Quasar <email@hidden>
- Date: Tue, 29 Jul 2003 08:42:09 -0400
On Tuesday, July 29, 2003, at 07:45 AM, M. Uli Kusterer wrote:
I'm using process in the BSD meaning of the word, so basically I want
the same list that Activity Monitor (from Utilities) gives me.
if you want the BSD meaning of process, as a last resort if there's
no Cocoa wrapper around that, you could use the BSD API that does
this. IIRC that would be sysctl().
I'm reasonably sure there's no Cocoa wrapper around it, but it would
probably be simpler to use NSTask to shell out to the 'ps' command.
sysctl() is a complicated set of multi-level options and data
structures, but the output of ps can be parsed easily since it's
possible to request specific information from ps and the output can be
distilled further using pipes into awk and grep. The only reason to use
sysctl() directly would be if speed is critical to the code in question.
-- Sailor Quasar, just another player in The World
"Come with me in the twilight of the summer night for awhile"
Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.