Write a program for mac

broken image
broken image

There are four ways to launch daemons using launchd. Thus, the term “daemon” is used generically in this section to encompass both system-level daemons and user agents except where otherwise noted. Unless otherwise noted, for the purposes of this chapter, the terms “daemon” and “agent” can be used interchangeably.

broken image

A user agent is essentially identical to a daemon, but is specific to a given logged-in user and executes only while that user is logged in. These per-user processes are referred to as user agents. If you are running per-user background processes for OS X, launchd is also the preferred way to start these processes. It also improves the ability of administrators to manage the daemons running on a given system. Using launchd provides better performance and flexibility for daemons. If you are developing daemons to run on OS X, it is highly recommended that you design your daemons to be launchd compliant. Next Previous Creating Launch Daemons and Agents