On 11-Nov-08, at 4:28 AM, Quinn wrote:
All of the "check in with launchd" stuff is only necessary when you're vending a service and you want to launch on demand. If you're connecting to a service, you shouldn't need it.
I wasn't aware of that. I'd read things about how a daemon has to promise to checkin with launchd, etc., so I thought it was an across- the-board requirement.
Q1: Are you planning to launch on demand, or do you want to launch at startup and keep running?
A launchd daemon that's set to launch at startup will launch well before the network comes up. Keep in mind that the network may / never/ come up, or may come up and go down (repeatedly even), so it's not a case of simply waiting for the network to come up, you have to track the network state.
Q2: Do you want to be running even if there's no possibility of connecting to your network service?
I had hoped that KeepAlive={NetworkState=true} would automatically start & stop the daemon with the network being connected & disconnected. Since that seems to be incorrect, I guess I have to make it launch at startup and keep running. I can programmatically check if the network is available (using SystemConfiguration notifications, I think, unless there's a better way), and start/stop activity appropriately. ---- Karl Moskowski <kolpanic@voodooergonomics.com> Voodoo Ergonomics Inc. <http://voodooergonomics.com/>