Until recently, the only way to way to manage daemons in OS X was the old UNIX solution: a combination of cron, xinetd, mach_init and init. However, Apple suggested a much more efficient solution when they introduced launchd with OS X 10.4
The idea is simple: “a single, standardized, interface to any and all programs started automatically by the system”.
There are a number of benefits of launchd, when compared to the classic UNIX way:
1. Jobs can be stopped or started without affecting other jobs.
2. Resource limits can be set to future jobs.
3. Single jobs may be added without interrupting the existing services.
Apple’s launchd is probably the first solution to finally centralize the management of everything related to service control.
I strongly recommend you to read Apple’s official introduction to launchd, so you can consider using in the future: http://developer.apple.com/macosx/launchd.html
Technorati Tags: Programming, launchd, Scripts
