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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to