OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at |
| 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. |
| 14 |
| 15 :doctype: manpage |
| 16 |
| 17 = on_demand_service_tool(1) |
| 18 |
| 19 == Name |
| 20 |
| 21 on_demand_service_tool - Load and unload on-demand Mach services registered with |
| 22 launchd(8) |
| 23 |
| 24 == Synopsis |
| 25 |
| 26 [verse] |
| 27 *on_demand_service_tool* *-L* *-l* 'LABEL' ['OPTION…'] 'COMMAND' ['ARG…'] |
| 28 *on_demand_service_tool* *-U* *-l* 'LABEL' |
| 29 |
| 30 == Description |
| 31 |
| 32 On-demand services may be registered with launchd(8) by using the *--load* form. |
| 33 One or more service names may be registered with the bootstrap server by |
| 34 specifying *--mach_service*. When a Mach message is sent to any of these |
| 35 services, launchd(8) will invoke 'COMMAND' along with any arguments specified |
| 36 ('ARG…'). 'COMMAND' must be an absolute pathname. |
| 37 |
| 38 The *--unload* form unregisters jobs registered with launchd(8). |
| 39 |
| 40 == Options |
| 41 |
| 42 *-L*, *--load*:: |
| 43 Registers a job with launchd(8). *--label*='LABEL' and 'COMMAND' are required. |
| 44 This operation may also be referred to as “load” or “submit”. |
| 45 |
| 46 *-U*, *--unload*:: |
| 47 Unregisters a job with launchd(8). *--label*='LABEL' is required. This operation |
| 48 may also be referred to as “unload” or “remove”. |
| 49 |
| 50 *-l*, *--label*='LABEL':: |
| 51 'LABEL' is used as the job label to identify the job to launchd(8). 'LABEL' must |
| 52 be unique within a launchd(8) context. |
| 53 |
| 54 *-m*, *--mach_service*='SERVICE':: |
| 55 In conjunction with *--load*, registers 'SERVICE' with the bootstrap server. |
| 56 Clients will be able to obtain a send right by looking up the 'SERVICE' name |
| 57 with the bootstrap server. When a message is sent to such a Mach port, |
| 58 launchd(8) will invoke 'COMMAND' along with any arguments specified ('ARG…') if |
| 59 it is not running. This forms the “on-demand” nature referenced by this tool’s |
| 60 name. This option may appear zero, one, or more times. 'SERVICE' must be unique |
| 61 within a bootstrap context. |
| 62 |
| 63 *--help*:: |
| 64 Display help and exit. |
| 65 |
| 66 *--version*:: |
| 67 Output version information and exit. |
| 68 |
| 69 == Examples |
| 70 |
| 71 Registers an on-demand server that will execute catch_exception_tool(1) when a |
| 72 Mach message is sent to a Mach port obtained from the bootstrap server by |
| 73 looking up the name +svc+: |
| 74 [subs="quotes"] |
| 75 ---- |
| 76 $ *on_demand_service_tool --load --label=catch_exception \ |
| 77 --mach_service=svc \ |
| 78 $(which catch_exception_tool) --mach_service=svc \ |
| 79 --file=/tmp/out --nonblocking --persistent* |
| 80 ---- |
| 81 |
| 82 Unregisters the on-demand server installed above: |
| 83 [subs="quotes"] |
| 84 ---- |
| 85 $ *on_demand_service_tool --unload --label=catch_exception* |
| 86 ---- |
| 87 |
| 88 == Exit Status |
| 89 |
| 90 *0*:: |
| 91 Success. |
| 92 |
| 93 *1*:: |
| 94 Failure, with a message printed to the standard error stream. |
| 95 |
| 96 == See Also |
| 97 |
| 98 exception_port_tool(1), |
| 99 launchctl(1) |
| 100 on_demand_service_tool(1) |
| 101 |
| 102 include::man_footer.ad[] |
OLD | NEW |