Bootstrap Daemons
Introduced with Panther, the register_mach_bootstrap_servers tool, provides a way to have system daemons launch on demand (that is, not until they receive their first service request). In fact, this method will eventually take the place of the StartupItems (see the following section) as Mac OS X evolves in future releases.
This tool assembles a list of daemons by reading each file in /etc/mach_init.d/ (for system daemons to be run as root) and /etc/mach_init_per_user.d/ (for user daemons to be run under normal user accounts). It then registers each daemon in the list and the service it provides with the mach_init daemon, itself launched by the Mach kernel early in the startup.
Once a daemon is registered, mach_init waits for requests from other processes for the services the daemon provides, launching (or relaunching) the daemon only when it detects a request. Such daemons, available to the system so early in the startup process, are known as bootstrap daemons. For now, only about a dozen system daemons are handled this way, none of which are network services.
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