]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/launchd.8
launchd-106.20.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
e91b9f68
A
10.Op Fl v
11.Op Fl s
12.Op Fl x
13.Op Ar -- command Op Ar args ...
14.Sh DESCRIPTION
15.Nm
16manages daemons, both for the system as a whole and for individual users. Ideal daemons can launch
17on demand based on criteria specified in their respective XML property lists located in one of the
18directories specified in the FILES section.
19.Pp
20When run with a command, a specific instance of
21.Nm
22is created and the command is implicitly added to the list of jobs maintained by
23.Nm .
24If the command exits, that instance of
25.Nm
26will clean up all jobs maintained by itself and exit. All children of the command will use that
27instance of
28.Nm .
29.Pp
30During boot
31.Nm
32is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system.
33.Sh OPTIONS WHEN RUN AS PID 1
34.Bl -tag -width -indent
ab36757d
A
35.It Fl d
36Daemonize. Useful when passing a command to launchd on the command line.
e91b9f68
A
37.It Fl v
38Verbose boot.
39.It Fl s
40Single user mode. Instructs
41.Nm launchd
42to give a shell prompt before booting the system.
43.It Fl x
44Safe mode boot. Instructs the system to boot conservatively.
45.El
ab36757d
A
46.Sh ENVIRONMENTAL VARIABLES
47.Bl -tag -width -indent
48.It Pa LAUNCHD_SOCKET
49This variable is exported when invoking a command via the launchd command line. It informs launchctl how to find the correct launchd to talk to.
50.El
e91b9f68
A
51.Sh NOTES
52In Darwin it is preferable to have your daemon launch via launchd instead of modifying
53.Nm rc
54or creating a
55.Nm SystemStarter
56Startup Item.
57.Pp
58At some point in the future, we hope to completely phase out the use of
59.Nm rc .
60.Sh FILES
61.Bl -tag -width "/System/Library/LaunchDaemons" -compact
62.It Pa ~/Library/LaunchAgents
63Per-user agents provided by the user.
64.It Pa /Library/LaunchAgents
65Per-user agents provided by the administrator.
66.It Pa /Library/LaunchDaemons
67System wide daemons provided by the administrator.
68.It Pa /System/Library/LaunchAgents
69Mac OS X Per-user agents.
70.It Pa /System/Library/LaunchDaemons
71Mac OS X System wide daemons.
72.El
73.Sh SEE ALSO
74.Xr launchctl 1 ,
75.Xr launchd.plist 5 ,
76.Xr rc 8 ,
77.Xr SystemStarter 8