Re: Getting process table info from within a Cocoa app
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