launchd
Mac OS X Tiger introduces the latest and greatest startup scheme, launchd. It has launch-on-demand capabilities and also supports on-demand launching via Mach ports (as does the mach_init.d scheme). launchd also offers the ability to launch on demand based on file system and Unix domain socket events. The property list (.plist) files for system-installed daemons are in /System/Library/LaunchDaemons. Locally-installed daemons can be installed into /Library/LaunchDaemons. Table 11-1 lists and describes the system-installed daemons, most of which have counterparts in Linux and Unix systems.
You can control launch daemons with the launchctl utility. For example, to enable and load a daemon that’s disabled (there will be a Disabled key in its property list file), use launchctl load -w followed by the path to the property list. For example, the following command would be enabled and start the telnet server:
# launchctl load -w /System/Library/LaunchDaemons/telnet.plist
You can stop and disable this daemon with unload -w:
# launchctl unload -w /System/Library/LaunchDaemons/telnet.plist
For more information, see launchctl in Chapter 2, or the launchctl manpage.
|
Property List File |
Description |
Enabled by default? |
|
bootps.plist |
Starts the DHCP/BOOTP daemon. |
No |
|
com.apple.atrun.plist |
Launches the atrun daemon. |
Yes |
|
com.apple.KernelEventAgent.plist |
Runs the kernel event agent, which responds to low-level kernel events (such as disk ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access