Skip to main content

Module launchd

Module launchd 

Source
Expand description

launchd job helpers shared by every macOS consumer: the unit-name to reverse-DNS label mapping, the GUI-domain uid, and the property-list renderer.

Every crate that writes or addresses launchd jobs takes the label and the plist shape from here, so they cannot disagree on either. Everything in this module is pure (no launchctl calls); driving jobs stays with the callers.

Structs§

PlistLogPaths
Optional job log redirection for a rendered plist. launchd defaults a job’s stdout/stderr to /dev/null; pointing them at a file is what makes a background agent inspectable after the fact.

Functions§

current_uid
Effective user id of this process, which names the launchd GUI domain (gui/<uid>) its jobs live in.
render_plist
Render a launchd property list for a managed service.
unit_to_label
Map a systemd-style unit name to a launchd reverse-DNS label.