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

Re: Getting process table info from within a Cocoa app


  • Subject: Re: Getting process table info from within a Cocoa app
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 25 Jul 2008 23:31:58 -0700

On Jul 25, 2008, at 10:58 PM, Sumner Trammell wrote:

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.

Better would be to run the daemon through launchd, if you can, and have it set up a secure UNIX-domain socket via its launchd property list. That will pass the path to the socket via an environment variable, and that socket can be used to communicate with the daemon -- or even launch it on demand.


  -- Chris

_______________________________________________

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


References: 
 >Getting process table info from within a Cocoa app (From: "Sumner Trammell" <email@hidden>)

  • Prev by Date: Re: Getting process table info from within a Cocoa app
  • Next by Date: How to locate coding examples for specified commands [Newbie]
  • Previous by thread: Re: Getting process table info from within a Cocoa app
  • Next by thread: Re: Getting process table info from within a Cocoa app
  • Index(es):
    • Date
    • Thread