About Daemons and Services
Many kinds of tasks that do not require user interaction are most effectively handled by a process that runs in the background. You can use a daemon or service to:
Provide server functionality, such serving web pages.
Coordinate access to of a shared resource, such as a database.
Perform work for a foreground application, such as file system access.
At a Glance
This document provides information that developers of daemons and other low-level system services need to write their code and incorporate it into the startup process. It also provides some useful information for system administrators who must manage the startup process on the computers they manage.
Design your Background Process
OS X provides a variety of background process types with different characteristics, designed for a different situations. There are also several ways for other processes to communicate with background processes. Choosing the appropriate design for a background process is an important first step.
Implement your Background Process
Having made the design decisions, you are ready to begin writing code. These chapters guide you through the process of creating specific types of background jobs.
Logging Errors and Warnings
Logging is an effective way for background processes to record unusual behavior and error conditions. Making appropriate use of the logging mechanisms provided by OS X can assist during debugging and end-user troubleshooting.
Running Jobs on a Timed Schedule
Although it is recommended that background jobs be launched on demand, in some cases running the job on a timed schedule is the most appropriate solution.
Daemons and Agents provides additional details about implementing launch daemons and agents.
Networking Overview describes the APIs available for sending and receiving data across the network.
© 2003, 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-07-23)