]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/launchd.8
launchd-257.tar.gz
[apple/launchd.git] / launchd / src / launchd.8
CommitLineData
e91b9f68
A
1.Dd September 30, 2004
2.Dt launchd 8
3.Os Darwin
4.Sh NAME
5.Nm launchd
6.Nd System wide and per-user daemon/agent manager
7.Sh SYNOPSIS
8.Nm
ab36757d 9.Op Fl d
ed34e3c3 10.Op Fl D
e91b9f68 11.Op Fl s
ed34e3c3 12.Op Fl S Ar SessionType
e91b9f68
A
13.Op Ar -- command Op Ar args ...
14.Sh DESCRIPTION
15.Nm
ed34e3c3
A
16manages processes, both for the system as a whole and for individual users.
17The primary and preferred interface to
18.Nm
19is via the
20.Xr launchctl 1
21tool which (among other options) allows the user or administrator to load and unload jobs.
22Where possible, it is preferable for jobs to launch on demand based on criteria specified
23in their respective configuration files.
e91b9f68
A
24.Pp
25When run with a command, a specific instance of
26.Nm
27is created and the command is implicitly added to the list of jobs maintained by
28.Nm .
29If the command exits, that instance of
30.Nm
31will clean up all jobs maintained by itself and exit. All children of the command will use that
32instance of
33.Nm .
34.Pp
35During boot
36.Nm
37is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system.
ed34e3c3 38.Sh OPTIONS
e91b9f68 39.Bl -tag -width -indent
ed34e3c3
A
40.It Fl D
41Debug. Prints syslog messages to stderr and adjusts logging via
42.Xr syslog 3
43to LOG_DEBUG.
ed34e3c3
A
44.El
45.Sh OPTIONS WHEN RUN AS PID 1
46.Bl -tag -width -indent
e91b9f68
A
47.It Fl s
48Single user mode. Instructs
49.Nm launchd
50to give a shell prompt before booting the system.
e91b9f68 51.El
ab36757d
A
52.Sh ENVIRONMENTAL VARIABLES
53.Bl -tag -width -indent
54.It Pa LAUNCHD_SOCKET
55This variable is exported when invoking a command via the launchd command line. It informs launchctl how to find the correct launchd to talk to.
56.El
e91b9f68
A
57.Sh NOTES
58In Darwin it is preferable to have your daemon launch via launchd instead of modifying
59.Nm rc
60or creating a
61.Nm SystemStarter
62Startup Item.
63.Pp
64At some point in the future, we hope to completely phase out the use of
65.Nm rc .
66.Sh FILES
67.Bl -tag -width "/System/Library/LaunchDaemons" -compact
68.It Pa ~/Library/LaunchAgents
69Per-user agents provided by the user.
70.It Pa /Library/LaunchAgents
71Per-user agents provided by the administrator.
72.It Pa /Library/LaunchDaemons
73System wide daemons provided by the administrator.
74.It Pa /System/Library/LaunchAgents
75Mac OS X Per-user agents.
76.It Pa /System/Library/LaunchDaemons
77Mac OS X System wide daemons.
78.El
79.Sh SEE ALSO
80.Xr launchctl 1 ,
81.Xr launchd.plist 5 ,
82.Xr rc 8 ,
83.Xr SystemStarter 8