launchd & launchctl

launchd is the macOS service and job manager (as well as the init system, and probably a few other things as well... but we care about daemons and jobs).

launchd calls jobs, services, etc. that run as the current user agents.

Loc'd uses launchd agents to manage it's jobs and services, and interacts with launchd through the launchctl command line interface, which is Ruby-wrapped by the Locd::Launchctl module.