System startup (also known as the boot process) involves a sequence of actions that prepare the computer for use by the user. This sequence includes a number of different tasks, including initializing hardware, starting system daemons, and displaying the login window. After a user logs in, the system completes an additional series of actions that sets up the computing environment for that user.
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.
You should read this document if you are writing or porting software that needs to be launched at boot time or at user login time. You should also read this document if you are interested in the system logging facilities provided by Apple system log (asl) facility.
This programming topic includes the following articles:
“The Boot Process” describes the overall sequence that occurs when Mac OS X boots, focusing on the places where developers can customize the boot cycle.
“Daemons” provides background information on daemons in Mac OS X.
“Guidelines for Creating and Launching Daemons” provides basic guidelines for developers who want to run daemons on Mac OS X.
“Creating launchd Daemons and Agents” provides guidance on how to create a daemon that runs under launchd
.
“Creating a Startup Item” provides information about how to create startup items to support the launching of daemons on versions of Mac OS X prior to 10.4.
“Logging Errors and Warnings” provides sample code for logging errors and warnings using syslog
and asl
.
“Customizing Login and Logout” provides information on how to customize the login process on older versions of Mac OS X.
© 2003, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-11-19)