O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

register_mach_bootstrap_servers

Synopsis

register_mach_bootstrap_servers config_source

Registers a Mach port with the bootstrap task of mach_init on behalf of a specified daemon. (A Mach task is analogous to a process that runs within the kernel of Mac OS X; a port is used to communicate between tasks.) When another task sends a request to the bootstrap task for access to a port, mach_init starts up the associated daemon if necessary.

This serves as a replacement for certain startup items. Instead of launching services from /System/Library/StartupItems/ (processed by SystemStarter), files in /etc/mach_init.d/ are processed by register_mach_bootstrap_servers, which is called from /etc/rc. (Per-user services are started by the login window application, which uses register_mach_bootstrap_servers to process /etc/mach_init_per_user.d/.) One advantage of this over startup items is that a daemon can be run only when needed, if another process needs to communicate with it, thus reducing resource consumption.

Options

config_source

Either an XML property list (.plist) file, or a directory containing such files. Each file is usually named after the associated daemon, and contains some of the following keys:

command

The path to the server executable. This is a required key.

isKUNCServer

Specify whether the daemon is kuncd, the Kernel-User Notification Center server, used by the kernel to communicate with users. Defaults to false.

OnDemand

Specify whether the daemon should only be started when ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required