• 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
Getting process table info from within a Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting process table info from within a Cocoa app


  • Subject: Getting process table info from within a Cocoa app
  • From: "Sumner Trammell" <email@hidden>
  • Date: Sat, 26 Jul 2008 01:58:06 -0400

Hi. A daemon process is running independently of my Cocoa app.  Given a pid
file of the daemon process in a known location, say /var/run/somedaemon.pid,
I would like my Cocoa app to read that file and check the process table to
see if the daemon is actually running. If the daemon IS running, I want my
Cocoa app to change its Dock icon.
Is there a canonical Cocoa way of doing this? Using NSTask and NSPipe to run
/bin/ps seems like a kludge.

I couldn't find anything useful in the NSProcessInfo class docs or the
"Interacting with the Operating System" guide.


Thanks,
-s
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Getting process table info from within a Cocoa app
      • From: Ken Thomases <email@hidden>
    • Re: Getting process table info from within a Cocoa app
      • From: Chris Hanson <email@hidden>
    • Re: Getting process table info from within a Cocoa app
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: NSSpeechSynthesizer delegate method not called in OCUint
  • Next by Date: Re: Getting process table info from within a Cocoa app
  • Previous by thread: Re: NSSpeechSynthesizer delegate method not called in OCUint
  • Next by thread: Re: Getting process table info from within a Cocoa app
  • Index(es):
    • Date
    • Thread