[launchd-dev] Daemon & Network Availability?

Quinn eskimo1 at apple.com
Tue Nov 11 01:28:40 PST 2008


I have a couple of comments and a couple of questions...

At 12:46 -0500 10/11/08, Karl Moskowski wrote:
>Thanks for the info, Ned. Would I need this if my daemon doesn't 
>provide any networks services? (The daemon really just a client for 
>a network service - I made it a daemon because it has to run without 
>a user logged into Mac OS X.) What type of refactoring do you think 
>would be required?

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.

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?

S+E
-- 
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


More information about the launchd-dev mailing list