6 .Nd System wide and per-user daemon/agent manager
12 .Op Fl S Ar SessionType
13 .Op Ar -- command Op Ar args ...
16 manages processes, both for the system as a whole and for individual users.
17 The primary and preferred interface to
21 tool which (among other options) allows the user or administrator to load and unload jobs.
22 Where possible, it is preferable for jobs to launch on demand based on criteria specified
23 in their respective configuration files.
25 When run with a command, a specific instance of
27 is created and the command is implicitly added to the list of jobs maintained by
29 If the command exits, that instance of
31 will clean up all jobs maintained by itself and exit. All children of the command will use that
37 is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system.
39 .Bl -tag -width -indent
41 Daemonize. Useful when passing a command to launchd on the command line.
43 Debug. Prints syslog messages to stderr and adjusts logging via
46 .It Fl S Ar SessionType
47 Instruct launchd to which session type it is.
49 .Sh OPTIONS WHEN RUN AS PID 1
50 .Bl -tag -width -indent
52 Single user mode. Instructs
54 to give a shell prompt before booting the system.
56 .Sh ENVIRONMENTAL VARIABLES
57 .Bl -tag -width -indent
59 This variable is exported when invoking a command via the launchd command line. It informs launchctl how to find the correct launchd to talk to.
62 In Darwin it is preferable to have your daemon launch via launchd instead of modifying
68 At some point in the future, we hope to completely phase out the use of
71 .Bl -tag -width "/System/Library/LaunchDaemons" -compact
72 .It Pa ~/Library/LaunchAgents
73 Per-user agents provided by the user.
74 .It Pa /Library/LaunchAgents
75 Per-user agents provided by the administrator.
76 .It Pa /Library/LaunchDaemons
77 System wide daemons provided by the administrator.
78 .It Pa /System/Library/LaunchAgents
79 Mac OS X Per-user agents.
80 .It Pa /System/Library/LaunchDaemons
81 Mac OS X System wide daemons.