register_mach_bootstrap_servers

register_mach_bootstrap_servers

 register_mach_bootstrap_servers   config_source   

Description

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 program serves as a replacement for certain startup items on Panther. 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 program 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/Usage


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

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


OnDemand

Specifies whether the daemon should only be started when it first receives a request for its bootstrap port. If set to false , the daemon is started immediately. Defaults to true .


ServiceName

An identifier for the service. The name should follow the convention used for Java classes: the reversed DNS domain name associated with the responsible organization, followed by one or more segments specifically identifying the service (e.g., com.apple.DirectoryService ). This is a required key.


Username

The user under which the daemon is started.

Location

/usr/libexec



Mac OS X Panther for Unix Geeks
Mac OS X Panther for Unix Geeks
ISBN: 0596006071
EAN: 2147483647
Year: 2003
Pages: 212

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net