]>
Commit | Line | Data |
---|---|---|
ddbbfbc1 | 1 | .Dd 1 May, 2009 |
e91b9f68 A |
2 | .Dt launchd.plist 5 |
3 | .Os Darwin | |
4 | .Sh NAME | |
5 | .Nm launchd.plist | |
6 | .Nd System wide and per-user daemon/agent configuration files | |
7 | .Sh DESCRIPTION | |
8 | This document details the parameters that can be given to an XML property list that can be loaded into | |
9 | .Nm launchd | |
10 | with | |
11 | .Nm launchctl . | |
12 | .Sh EXPECTATIONS | |
13 | Daemons or agents managed by | |
14 | .Nm launchd | |
15 | are expected to behave certain ways. | |
16 | .Pp | |
17 | A daemon or agent launched by | |
18 | .Nm launchd | |
19 | MUST NOT do the following in the process directly launched by | |
20 | .Nm launchd : | |
21 | .Pp | |
22 | .Bl -bullet -offset indent -compact | |
23 | .It | |
ed34e3c3 A |
24 | Call |
25 | .Xr daemon 3 . | |
26 | .It | |
27 | Do the moral equivalent of | |
28 | .Xr daemon 3 | |
29 | by calling | |
e91b9f68 A |
30 | .Xr fork 2 |
31 | and have the parent process | |
32 | .Xr exit 3 | |
33 | or | |
34 | .Xr _exit 2 . | |
e91b9f68 A |
35 | .El |
36 | .Pp | |
37 | A daemon or agent launched by | |
38 | .Nm launchd | |
39 | SHOULD NOT do the following as a part of their startup initialization: | |
40 | .Pp | |
41 | .Bl -bullet -offset indent -compact | |
42 | .It | |
43 | Setup the user ID or group ID. | |
44 | .It | |
45 | Setup the working directory. | |
46 | .It | |
47 | .Xr chroot 2 | |
48 | .It | |
49 | .Xr setsid 2 | |
50 | .It | |
51 | Close "stray" file descriptors. | |
52 | .It | |
53 | Change | |
54 | .Xr stdio 3 | |
55 | to /dev/null. | |
56 | .It | |
57 | Setup resource limits with | |
58 | .Xr setrusage 2 . | |
59 | .It | |
60 | Setup priority with | |
61 | .Xr setpriority 2 . | |
62 | .It | |
63 | Ignore the SIGTERM signal. | |
64 | .El | |
65 | .Pp | |
66 | A daemon or agent launched by | |
67 | .Nm launchd | |
68 | SHOULD: | |
69 | .Pp | |
70 | .Bl -bullet -offset indent -compact | |
71 | .It | |
72 | Launch on demand given criteria specified in the XML property list. | |
ed34e3c3 | 73 | More information can be found later in this man page. |
e91b9f68 A |
74 | .It |
75 | Catch the SIGTERM signal. | |
76 | .El | |
77 | .Sh XML PROPERTY LIST KEYS | |
ddbbfbc1 | 78 | The following keys can be used to describe the configuration details of your daemon or agent. |
ed34e3c3 A |
79 | Property lists are Apple's standard configuration file format. Please see |
80 | .Xr plist 5 | |
ddbbfbc1 A |
81 | for more information. Please note: property list files are expected to have their name end in ".plist". |
82 | Also please note that it is the expected convention for launchd property list files to be named <Label>.plist. | |
83 | Thus, if your job label is "com.apple.sshd", your plist file should be named "com.apple.sshd.plist". | |
e91b9f68 A |
84 | .Pp |
85 | .Bl -ohang | |
86 | .It Sy Label <string> | |
87 | This required key uniquely identifies the job to | |
88 | .Nm launchd . | |
89 | .It Sy Disabled <boolean> | |
ddbbfbc1 A |
90 | This optional key is used as a hint to |
91 | .Xr launchctl 1 | |
92 | that it should not submit this job to | |
93 | .Nm launchd | |
94 | when loading a job or jobs. The value of this key does NOT reflect the current state of the job on the running system. If you wish to know whether a job is loaded in launchd, reading this key from a configuration file yourself is not a | |
95 | sufficient test. You should query | |
96 | .Nm launchd | |
97 | for the presence of the job using the | |
98 | .Xr launchctl 1 | |
99 | .Ar list | |
100 | subcommand or use the ServiceManagement framework's SMJobCopyDictionary() method. | |
101 | .Pp | |
102 | Note that as of Mac OS X v10.6, this key's value in a configuration | |
103 | file conveys a default value, which is changed with the | |
104 | .Op Ar -w | |
105 | option of the | |
106 | .Xr launchctl 1 | |
107 | .Ar load | |
108 | and | |
109 | .Ar unload | |
110 | subcommands. These subcommands no longer modify the configuration file, so the value displayed in the configuration file is not necessarily the value that | |
111 | .Xr launchctl 1 | |
112 | will apply. See | |
113 | .Xr launchctl 1 | |
114 | for more information. | |
115 | .Pp | |
116 | Please also be mindful that you should only use this key if the provided | |
117 | on-demand and KeepAlive criteria are insufficient to describe the conditions under which your job needs to run. The cost | |
118 | to have a job loaded in | |
119 | .Nm launchd | |
120 | is negligible, so there is no harm in loading a job which only runs once or very rarely. | |
e91b9f68 | 121 | .It Sy UserName <string> |
ed34e3c3 | 122 | This optional key specifies the user to run the job as. This key is only applicable when launchd is running as root. |
e91b9f68 | 123 | .It Sy GroupName <string> |
ed34e3c3 | 124 | This optional key specifies the group to run the job as. This key is only applicable when launchd is running as root. If UserName is set and GroupName is not, the the group will be set to the default group of the user. |
e91b9f68 | 125 | .It Sy inetdCompatibility <dictionary> |
ed34e3c3 | 126 | The presence of this key specifies that the daemon expects to be run as if it were launched from inetd. |
e91b9f68 A |
127 | .Bl -ohang -offset indent |
128 | .It Sy Wait <boolean> | |
ed34e3c3 A |
129 | This flag corresponds to the "wait" or "nowait" option of inetd. If true, then the listening socket is passed via the standard in/out/error file descriptors. If false, then |
130 | .Xr accept 2 | |
131 | is called on behalf of the job, and the result is passed via the standard in/out/error descriptors. | |
e91b9f68 | 132 | .El |
ed34e3c3 | 133 | .It Sy LimitLoadToHosts <array of strings> |
ddbbfbc1 A |
134 | This configuration file only applies to the hosts listed with this key. Note: One should set kern.hostname in |
135 | .Xr sysctl.conf 5 | |
136 | for this feature to work reliably. | |
ed34e3c3 | 137 | .It Sy LimitLoadFromHosts <array of strings> |
ddbbfbc1 A |
138 | This configuration file only applies to hosts NOT listed with this key. Note: One should set kern.hostname in |
139 | .Xr sysctl.conf 5 | |
140 | for this feature to work reliably. | |
ed34e3c3 A |
141 | .It Sy LimitLoadToSessionType <string> |
142 | This configuration file only applies to sessions of the type specified. This key is used | |
143 | in concert with the -S flag to | |
144 | .Nm launchctl . | |
e91b9f68 | 145 | .It Sy Program <string> |
5b0a4722 | 146 | This key maps to the first argument of |
e91b9f68 A |
147 | .Xr execvp 3 . |
148 | If this key is missing, then the first element of the array of strings provided to the ProgramArguments will be used instead. | |
5b0a4722 A |
149 | This key is required in the absence of the ProgramArguments key. |
150 | .It Sy ProgramArguments <array of strings> | |
151 | This key maps to the second argument of | |
152 | .Xr execvp 3 . | |
ddbbfbc1 | 153 | This key is required in the absence of the Program key. Please note: many people are confused by this key. Please read |
5b0a4722 A |
154 | .Xr execvp 3 |
155 | very carefully! | |
ed34e3c3 A |
156 | .It Sy EnableGlobbing <boolean> |
157 | This flag causes | |
158 | .Nm launchd | |
159 | to use the | |
160 | .Xr glob 3 | |
161 | mechanism to update the program arguments before invocation. | |
ddbbfbc1 A |
162 | .It Sy EnableTransactions <boolean> |
163 | This flag instructs | |
164 | .Nm launchd | |
165 | that the job promises to use | |
166 | .Xr vproc_transaction_begin 3 | |
167 | and | |
168 | .Xr vproc_transaction_end 3 | |
169 | to track outstanding transactions that need to be reconciled before the process can safely terminate. If no outstanding transactions are in progress, then | |
170 | .Nm launchd | |
171 | is free to send the SIGKILL signal. | |
e91b9f68 | 172 | .It Sy OnDemand <boolean> |
ed34e3c3 | 173 | This key was used in Mac OS X 10.4 to control whether a job was kept alive or not. The default was true. |
ddbbfbc1 | 174 | This key has been deprecated and replaced in Mac OS X 10.5 and later with the more powerful KeepAlive option. |
ed34e3c3 A |
175 | .It Sy KeepAlive <boolean or dictionary of stuff> |
176 | This optional key is used to control whether your job is to be kept | |
177 | continuously running or to let demand and conditions control the invocation. The | |
178 | default is false and therefore only demand will start the job. The value may be | |
179 | set to true to unconditionally keep the job alive. Alternatively, a dictionary | |
180 | of conditions may be specified to selectively control whether | |
181 | .Nm launchd | |
182 | keeps a job alive or not. If multiple keys are provided, launchd ORs them, thus | |
183 | providing maximum flexibility to the job to refine the logic and stall if necessary. If | |
184 | .Nm launchd | |
185 | finds no reason to restart the job, it falls back on demand based invocation. | |
186 | Jobs that exit quickly and frequently when configured to be kept alive will be | |
187 | throttled to converve system resources. | |
188 | .Bl -ohang -offset indent | |
189 | .It Sy SuccessfulExit <boolean> | |
190 | If true, the job will be restarted as long as the program exits and with an exit | |
191 | status of zero. If false, the job will be restarted in the inverse condition. | |
192 | This key implies that "RunAtLoad" is set to true, since the job needs to run at | |
193 | least once before we can get an exit status. | |
194 | .It Sy NetworkState <boolean> | |
195 | If true, the job will be kept alive as long as the network is up, where up is | |
196 | defined as at least one non-loopback interface being up and having IPv4 or IPv6 | |
197 | addresses assigned to them. | |
198 | If false, the job will be kept alive in the inverse condition. | |
199 | .It Sy PathState <dictionary of booleans> | |
200 | Each key in this dictionary is a file-system path. If the value of the key is | |
201 | true, then the job will be kept alive as long as the path exists. | |
202 | If false, the job will be kept alive in the inverse condition. The intent of this | |
203 | feature is that two or more jobs may create semaphores in the file-system namespace. | |
5b0a4722 A |
204 | .It Sy OtherJobEnabled <dictionary of booleans> |
205 | Each key in this dictionary is the label of another job. If the value of the key is | |
206 | true, then this job is kept alive as long as that other job is enabled. Otherwise, | |
207 | if the value is false, then this job is kept alive as long as the other job is disabled. | |
208 | This feature should not be considered a substitute for the use of IPC. | |
ed34e3c3 | 209 | .El |
e91b9f68 A |
210 | .It Sy RunAtLoad <boolean> |
211 | This optional key is used to control whether your job is launched once at the time the job is loaded. The default is false. | |
212 | .It Sy RootDirectory <string> | |
ed34e3c3 | 213 | This optional key is used to specify a directory to |
e91b9f68 A |
214 | .Xr chroot 2 |
215 | to before running the job. | |
216 | .It Sy WorkingDirectory <string> | |
ed34e3c3 | 217 | This optional key is used to specify a directory to |
e91b9f68 A |
218 | .Xr chdir 2 |
219 | to before running the job. | |
e91b9f68 | 220 | .It Sy EnvironmentVariables <dictionary of strings> |
ddbbfbc1 | 221 | This optional key is used to specify additional environmental variables to be set before running the job. |
e91b9f68 A |
222 | .It Sy Umask <integer> |
223 | This optional key specifies what value should be passed to | |
224 | .Xr umask 2 | |
ed34e3c3 | 225 | before running the job. Known bug: Property lists don't support octal, so please convert the value to decimal. |
e91b9f68 | 226 | .It Sy TimeOut <integer> |
5b0a4722 | 227 | The recommended idle time out (in seconds) to pass to the job. If no value is specified, a default time out will be supplied by |
e91b9f68 A |
228 | .Nm launchd |
229 | for use by the job at check in time. | |
5b0a4722 A |
230 | .It Sy ExitTimeOut <integer> |
231 | The amount of time | |
232 | .Nm launchd | |
233 | waits before sending a SIGKILL signal. The default value is 20 seconds. The value zero is interpreted as infinity. | |
234 | .It Sy ThrottleInterval <integer> | |
235 | This key lets one override the default throttling policy imposed on jobs by | |
236 | .Nm launchd . | |
237 | The value is in seconds, and by default, jobs will not be spawned more than once every 10 seconds. | |
238 | The principle behind this is that jobs should linger around just in case they are needed again in the near future. This not only | |
239 | reduces the latency of responses, but it encourages developers to amortize the cost of program invocation. | |
e91b9f68 | 240 | .It Sy InitGroups <boolean> |
ddbbfbc1 | 241 | This optional key specifies whether |
e91b9f68 | 242 | .Xr initgroups 3 |
ddbbfbc1 | 243 | should be called before running the job. |
5b0a4722 | 244 | The default is true in 10.5 and false in 10.4. This key will be ignored if the UserName key is not set. |
e91b9f68 A |
245 | .It Sy WatchPaths <array of strings> |
246 | This optional key causes the job to be started if any one of the listed paths are modified. | |
247 | .It Sy QueueDirectories <array of strings> | |
248 | Much like the WatchPaths option, this key will watch the paths for modifications. The difference being that the job will only be started if the path is a directory and the directory is not empty. | |
5b0a4722 A |
249 | .It Sy StartOnMount <boolean> |
250 | This optional key causes the job to be started every time a filesystem is mounted. | |
e91b9f68 A |
251 | .It Sy StartInterval <integer> |
252 | This optional key causes the job to be started every N seconds. | |
ab36757d A |
253 | If the system is asleep, the job will be started the next time the computer |
254 | wakes up. If multiple intervals transpire before the computer is woken, those | |
255 | events will be coalesced into one event upon wake from sleep. | |
ed34e3c3 | 256 | .It Sy StartCalendarInterval <dictionary of integers or array of dictionary of integers> |
e91b9f68 | 257 | This optional key causes the job to be started every calendar interval as specified. Missing arguments are considered to be wildcard. The semantics are much like |
ab36757d A |
258 | .Xr crontab 5 . |
259 | Unlike cron which skips job invocations when the computer is asleep, launchd | |
260 | will start the job the next time the computer wakes up. If multiple intervals | |
261 | transpire before the computer is woken, those events will be coalesced into one | |
262 | event upon wake from sleep. | |
e91b9f68 A |
263 | .Bl -ohang -offset indent |
264 | .It Sy Minute <integer> | |
265 | The minute on which this job will be run. | |
266 | .It Sy Hour <integer> | |
267 | The hour on which this job will be run. | |
268 | .It Sy Day <integer> | |
269 | The day on which this job will be run. | |
270 | .It Sy Weekday <integer> | |
271 | The weekday on which this job will be run (0 and 7 are Sunday). | |
272 | .It Sy Month <integer> | |
273 | The month on which this job will be run. | |
274 | .El | |
ddbbfbc1 A |
275 | .It Sy StandardInPath <string> |
276 | This optional key specifies what file should be used for data being supplied to stdin when using | |
277 | .Xr stdio 3 . | |
e91b9f68 A |
278 | .It Sy StandardOutPath <string> |
279 | This optional key specifies what file should be used for data being sent to stdout when using | |
280 | .Xr stdio 3 . | |
281 | .It Sy StandardErrorPath <string> | |
282 | This optional key specifies what file should be used for data being sent to stderr when using | |
283 | .Xr stdio 3 . | |
284 | .It Sy Debug <boolean> | |
285 | This optional key specifies that | |
286 | .Nm launchd | |
287 | should adjust its log mask temporarily to LOG_DEBUG while dealing with this job. | |
ed34e3c3 A |
288 | .It Sy WaitForDebugger <boolean> |
289 | This optional key specifies that | |
290 | .Nm launchd | |
291 | should instruct the kernel to have the job wait for a debugger to attach before any code in the job is executed. | |
e91b9f68 A |
292 | .It Sy SoftResourceLimits <dictionary of integers> |
293 | .It Sy HardResourceLimits <dictionary of integers> | |
294 | Resource limits to be imposed on the job. These adjust variables set with | |
295 | .Xr setrlimit 2 . | |
296 | The following keys apply: | |
297 | .Bl -ohang -offset indent | |
298 | .It Sy Core <integer> | |
299 | The largest size (in bytes) core file that may be created. | |
300 | .It Sy CPU <integer> | |
301 | The maximum amount of cpu time (in seconds) to be used by each process. | |
302 | .It Sy Data <integer> | |
303 | The maximum size (in bytes) of the data segment for a process; this defines how far a program may extend its break with the | |
304 | .Xr sbrk 2 | |
305 | system call. | |
306 | .It Sy FileSize <integer> | |
307 | The largest size (in bytes) file that may be created. | |
308 | .It Sy MemoryLock <integer> | |
309 | The maximum size (in bytes) which a process may lock into memory using the | |
310 | .Xr mlock 2 | |
311 | function. | |
312 | .It Sy NumberOfFiles <integer> | |
313 | The maximum number of open files for this process. | |
ddbbfbc1 A |
314 | Setting this value in a system wide daemon will set the |
315 | .Xr sysctl 3 | |
316 | kern.maxfiles (SoftResourceLimits) or kern.maxfilesperproc (HardResourceLimits) value in addition to the | |
317 | .Xr setrlimit 2 | |
318 | values. | |
e91b9f68 A |
319 | .It Sy NumberOfProcesses <integer> |
320 | The maximum number of simultaneous processes for this user id. | |
ddbbfbc1 A |
321 | Setting this value in a system wide daemon will set the |
322 | .Xr sysctl 3 | |
323 | kern.maxproc (SoftResourceLimits) or kern.maxprocperuid (HardResourceLimits) | |
324 | value in addition to the | |
325 | .Xr setrlimit 2 | |
326 | values. | |
e91b9f68 A |
327 | .It Sy ResidentSetSize <integer> |
328 | The maximum size (in bytes) to which a process's resident set size may grow. | |
329 | This imposes a limit on the amount of physical memory to be given to a process; | |
330 | if memory is tight, the system will prefer to take memory from processes that | |
331 | are exceeding their declared resident set size. | |
332 | .It Sy Stack <integer> | |
333 | The maximum size (in bytes) of the stack segment for a process; this defines | |
334 | how far a program's stack segment may be extended. Stack extension is | |
335 | performed automatically by the system. | |
336 | .El | |
337 | .It Sy Nice <integer> | |
338 | This optional key specifies what | |
339 | .Xr nice 3 | |
340 | value should be applied to the daemon. | |
5b0a4722 A |
341 | .It Sy AbandonProcessGroup <boolean> |
342 | When a job dies, | |
343 | .Nm launchd | |
344 | kills any remaining processes with the same process group ID as the job. | |
345 | Setting this key to true disables that behavior. | |
346 | .It Sy HopefullyExitsFirst <boolean> | |
347 | This optional key causes programs to exit earlier during system shutdown. | |
348 | This key exists because some jobs do more than flush buffers and exit like | |
349 | they're supposed to. The use of this key should be considered a | |
350 | temporary solution until the software can be changed to only flush dirty buffers | |
351 | and then exit. | |
352 | .It Sy HopefullyExitsLast <boolean> | |
353 | This optional key causes programs to exit later during system shutdown. This | |
354 | key exists because some jobs don't reference count their clients, and therefore | |
355 | do not know when it is safe to exit. The use of this key should be considered a | |
356 | temporary solution until the software can be changed to properly reference | |
357 | count clients. | |
e91b9f68 A |
358 | .It Sy LowPriorityIO <boolean> |
359 | This optional key specifies whether the kernel should consider this daemon to be low priority when doing file system I/O. | |
5b0a4722 A |
360 | .It Sy LaunchOnlyOnce <boolean> |
361 | This optional key specifies whether the job can only be run once and only once. | |
362 | In other words, if the job cannot be safely respawned without a full machine | |
363 | reboot, then set this key to be true. | |
364 | .It Sy MachServices <dictionary of booleans or a dictionary of dictionaries> | |
ed34e3c3 A |
365 | This optional key is used to specify Mach services to be registered with the |
366 | Mach bootstrap sub-system. Each key in this dictionary should be the name of | |
5b0a4722 A |
367 | service to be advertised. The value of the key must be a boolean and set to true. |
368 | Alternatively, a dictionary can be used instead of a simple true value. | |
369 | .Bl -ohang -offset indent | |
370 | .It Sy ResetAtClose <boolean> | |
371 | If this boolean is false, the port is recycled, thus leaving clients to remain oblivious | |
372 | to the demand nature of job. If the value is set to true, clients receive port | |
ed34e3c3 A |
373 | death notifications when the job lets go of the receive right. The port will be |
374 | recreated atomically with respect to bootstrap_look_up() calls, so that clients | |
375 | can trust that after receiving a port death notification, the new port will | |
5b0a4722 A |
376 | have already been recreated. Setting the value to true should be done with |
377 | care. Not all clients may be able to handle this behavior. The default value is false. | |
378 | .It Sy HideUntilCheckIn <boolean> | |
379 | Reserve the name in the namespace, but cause bootstrap_look_up() to fail until the job has checked in with | |
380 | .Nm launchd . | |
381 | .El | |
382 | .Pp | |
383 | Finally, for the job itself, the values will be replaced with Mach ports at the time of check-in with | |
ed34e3c3 | 384 | .Nm launchd . |
ab36757d | 385 | .It Sy Sockets <dictionary of dictionaries... OR dictionary of array of dictionaries...> |
e91b9f68 A |
386 | This optional key is used to specify launch on demand sockets that can be used to let |
387 | .Nm launchd | |
ed34e3c3 | 388 | know when to run the job. The job must check-in to get a copy of the file descriptors using APIs outlined in |
e91b9f68 | 389 | .Xr launch 3 . |
ab36757d | 390 | The keys of the top level Sockets dictionary can be anything. They are meant for the application developer to use to |
ddbbfbc1 A |
391 | differentiate which descriptors correspond to which application level protocols (e.g. http vs. ftp vs. DNS...). |
392 | At check-in time, the value of each Sockets dictionary key will be an array of descriptors. Daemon/Agent writers should | |
ab36757d A |
393 | consider all descriptors of a given key to be to be effectively equivalent, even though each file descriptor likely represents |
394 | a different networking protocol which conforms to the criteria specified in the job configuration file. | |
395 | .Pp | |
5b0a4722 | 396 | The parameters below are used as inputs to call |
e91b9f68 A |
397 | .Xr getaddrinfo 3 . |
398 | .Bl -ohang -offset indent | |
399 | .It Sy SockType <string> | |
400 | This optional key tells | |
401 | .Nm launchctl | |
402 | what type of socket to create. The default is "stream" and other valid values for this key | |
403 | are "dgram" and "seqpacket" respectively. | |
404 | .It Sy SockPassive <boolean> | |
405 | This optional key specifies whether | |
406 | .Xr listen 2 | |
407 | or | |
408 | .Xr connect 2 | |
409 | should be called on the created file descriptor. The default is true ("to listen"). | |
410 | .It Sy SockNodeName <string> | |
411 | This optional key specifies the node to | |
412 | .Xr connect 2 | |
413 | or | |
414 | .Xr bind 2 | |
415 | to. | |
416 | .It Sy SockServiceName <string> | |
417 | This optional key specifies the service on the node to | |
418 | .Xr connect 2 | |
419 | or | |
420 | .Xr bind 2 | |
421 | to. | |
422 | .It Sy SockFamily <string> | |
423 | This optional key can be used to specifically request that "IPv4" or "IPv6" socket(s) be created. | |
424 | .It Sy SockProtocol <string> | |
425 | This optional key specifies the protocol to be passed to | |
426 | .Xr socket 2 . | |
427 | The only value understood by this key at the moment is "TCP". | |
428 | .It Sy SockPathName <string> | |
429 | This optional key implies SockFamily is set to "Unix". It specifies the path to | |
430 | .Xr connect 2 | |
431 | or | |
432 | .Xr bind 2 | |
433 | to. | |
ed34e3c3 A |
434 | .It Sy SecureSocketWithKey <string> |
435 | This optional key is a variant of SockPathName. Instead of binding to a known | |
436 | path, a securely generated socket is created and the path is assigned to the | |
437 | environment variable that is inherited by all jobs spawned by launchd. | |
aa59983a | 438 | .It Sy SockPathMode <integer> |
ed34e3c3 A |
439 | This optional key specifies the mode of the socket. Known bug: Property lists |
440 | don't support octal, so please convert the value to decimal. | |
e91b9f68 A |
441 | .It Sy Bonjour <boolean or string or array of strings> |
442 | This optional key can be used to request that the service be registered with the | |
443 | .Xr mDNSResponder 8 . | |
444 | If the value is boolean, the service name is inferred from the SockServiceName. | |
ab36757d A |
445 | .It Sy MulticastGroup <string> |
446 | This optional key can be used to request that the datagram socket join a multicast group. | |
447 | If the value is a hostname, then | |
448 | .Xr getaddrinfo 3 | |
449 | will be used to join the correct multicast address for a given socket family. | |
ed34e3c3 A |
450 | If an explicit IPv4 or IPv6 address is given, it is required that the |
451 | SockFamily family also be set, otherwise the results are undefined. | |
e91b9f68 A |
452 | .El |
453 | .El | |
454 | .Pp | |
ed34e3c3 A |
455 | .Sh DEPENDENCIES |
456 | Unlike many bootstrapping daemons, launchd has no explicit dependency model. | |
457 | Interdependencies are expected to be solved through the use of IPC. | |
458 | It is therefore in the best interest of a job developer who expects dependents | |
459 | to define all of the sockets in the configuration file. This has the added | |
460 | benefit of making it possible to start the job based on demand instead of | |
461 | immediately. | |
e91b9f68 A |
462 | .Sh EXAMPLE XML PROPERTY LISTS |
463 | .Pp | |
464 | The following XML Property List simply keeps "exampled" running continuously: | |
465 | .Pp | |
466 | .Dl <?xml version="1.0" encoding="UTF-8"?> | |
467 | .Dl <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
468 | .Dl <plist version="1.0"> | |
469 | .Dl <dict> | |
470 | .Dl <key>Label</key> | |
471 | .Dl <string>com.example.exampled</string> | |
472 | .Dl <key>ProgramArguments</key> | |
473 | .Dl <array> | |
474 | .Dl <string>exampled</string> | |
475 | .Dl </array> | |
ed34e3c3 A |
476 | .Dl <key>KeepAlive</key> |
477 | .Dl <true/> | |
e91b9f68 A |
478 | .Dl </dict> |
479 | .Dl </plist> | |
480 | .Pp | |
481 | .Sh FILES | |
482 | .Bl -tag -width "/System/Library/LaunchDaemons" -compact | |
483 | .It Pa ~/Library/LaunchAgents | |
484 | Per-user agents provided by the user. | |
485 | .It Pa /Library/LaunchAgents | |
486 | Per-user agents provided by the administrator. | |
487 | .It Pa /Library/LaunchDaemons | |
ddbbfbc1 | 488 | System-wide daemons provided by the administrator. |
e91b9f68 | 489 | .It Pa /System/Library/LaunchAgents |
ddbbfbc1 | 490 | Per-user agents provided by Mac OS X. |
e91b9f68 | 491 | .It Pa /System/Library/LaunchDaemons |
ddbbfbc1 | 492 | System-wide daemons provided by Mac OS X. |
e91b9f68 A |
493 | .El |
494 | .Sh SEE ALSO | |
495 | .Xr launchctl 1 , | |
ddbbfbc1 | 496 | .Xr sysctl 3 , |
ed34e3c3 A |
497 | .Xr launchd 8 , |
498 | .Xr plist 5 |