[launchd-dev] Start a process on behalf of launchd

Quinn "The Eskimo!" eskimo1 at apple.com
Tue Nov 2 04:17:47 PDT 2010


On 1 Nov 2010, at 17:38, eveningnick eveningnick wrote:

> What is the correct way to launch a process not fork'ing and exec'ing, using launchd instead?

The launchd philosophy is not about processes, it's about services.  The whole goal is to abstract away the notion of processes providing services, and replace it with the idea that services are provided by something, and the client doesn't really care what.  This allows more flexibility (you can change which processes provide which services), more reliability (the process providing the service can come and go, but talking to the service will always ensure it's running), and an easier API (clients don't have to care about processes and services, just about services).

Given this philosophy there's no correct way to launch a process using launchd.  The whole question runs counter to the launchd philosophy.

Which brings us back to the big picture.  Is your question related to your previous questions about implementing an agent that monitors whether another process is running or not?

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