• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Talking to the Dock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Talking to the Dock
      • From: "M. Uli Kusterer" <email@hidden>
References: 
 >Re: Talking to the Dock (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Initializing controls at startup
  • Next by Date: Re: cocoa-dev digest, Vol 2 #2711 - 14 msgs
  • Previous by thread: Re: Talking to the Dock
  • Next by thread: Re: Talking to the Dock
  • Index(es):
    • Date
    • Thread