| 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 = crashpad_handler(8) | |
| 18 | |
| 19 == Name | |
| 20 | |
| 21 crashpad_handler - Crashpad’s exception handler server | |
| 22 | |
| 23 == Synopsis | |
| 24 | |
| 25 [verse] | |
| 26 *crashpad_handler* ['OPTION…'] | |
| 27 | |
| 28 == Description | |
| 29 | |
| 30 This program is Crashpad’s main exception-handling server. It is responsible for | |
| 31 catching exceptions, writing crash reports, and uploading them to a crash report | |
| 32 collection server. Uploads are disabled by default, and can only be enabled by a | |
| 33 Crashpad client using the Crashpad client library, typically in response to a | |
| 34 user requesting this behavior. | |
| 35 | |
| 36 On OS X, this server may be started by its initial client, in which case it | |
| 37 performs a handshake with this client via a pipe established by the client that | |
| 38 is inherited by the server, referenced by the *--handshake-fd* argument. During | |
| 39 the handshake, the server furnishes the client with a send right that the client | |
| 40 may use as an exception port. The server retains the corresponding receive | |
| 41 right, which it monitors for exception messages. When the receive right loses | |
| 42 all senders, the server exits after allowing any upload in progress to complete. | |
| 43 | |
| 44 Alternatively, on OS X, this server may be started from launchd(8), where it | |
| 45 receives the Mach service name in a *--mach-service* argument. It checks in with | |
| 46 the bootstrap server under this service name, and clients may look it up with | |
| 47 the bootstrap server under this service name. It monitors this service for | |
| 48 exception messages. Upon receipt of +SIGTERM+, the server exits after allowing | |
| 49 any upload in progress to complete. +SIGTERM+ is normally sent by launchd(8) | |
| 50 when it determines that the server should exit. | |
| 51 | |
| 52 On Windows, clients register with this server by communicating with it via the | |
| 53 named pipe identified by the *--pipe-name* argument. Alternatively, the server | |
| 54 can inherit an already-created pipe from a parent process by using the | |
| 55 *--initial-client-data* mechanism. That argument also takes all of the arguments | |
| 56 that would normally be passed in a registration message, and so constitutes | |
| 57 registration of the first client. Subsequent clients may then register by | |
| 58 communicating with the server via the pipe. During registration, a client | |
| 59 provides the server with an OS event object that it will signal should it crash. | |
| 60 The server obtains the client’s process handle and waits on the crash event | |
| 61 object for a crash, as well as the client’s process handle for the client to | |
| 62 exit cleanly without crashing. When a server started via the | |
| 63 *--initial-client-data* mechanism loses all of its clients, it exits after | |
| 64 allowing any upload in progress to complete. | |
| 65 | |
| 66 On Windows, this executable is built by default as a Windows GUI app, so no | |
| 67 console will appear in normal usage. This is the version that will typically be | |
| 68 used. A second copy is also made with a +.com+ extension, rather than +.exe+. In | |
| 69 this second copy, the PE header is modified to indicate that it's a console app. | |
| 70 This is useful because the +.com+ is found in the path before the +.exe+, so | |
| 71 when run normally from a shell using only the basename (without an explicit | |
| 72 +.com+ or +.exe+ extension), the +.com+ console version will be chosen, and so | |
| 73 stdio will be hooked up as expected to the parent console so that logging output | |
| 74 will be visible. | |
| 75 | |
| 76 It is not normally appropriate to invoke this program directly. Usually, it will | |
| 77 be invoked by a Crashpad client using the Crashpad client library, or started by | |
| 78 another system service. On OS X, arbitrary programs may be run with a Crashpad | |
| 79 handler by using man_link:run_with_crashpad[1] to establish the Crashpad client | |
| 80 environment before running a program. | |
| 81 | |
| 82 == Options | |
| 83 *--annotation*='KEY=VALUE':: | |
| 84 Sets a process-level annotation mapping 'KEY' to 'VALUE' in each crash report | |
| 85 that is written. This option may appear zero, one, or multiple times. | |
| 86 + | |
| 87 Most annotations should be provided by the Crashpad client as module-level | |
| 88 annotations instead of process-level annotations. Module-level annotations are | |
| 89 more flexible in that they can be modified and cleared during the client | |
| 90 program’s lifetime. Module-level annotations can be set via the Crashpad client | |
| 91 library. Process-level annotations are useful for annotations that the | |
| 92 collection server requires be present, that have fixed values, and for cases | |
| 93 where a program that does not use the Crashpad client library is being | |
| 94 monitored. | |
| 95 + | |
| 96 Breakpad-type collection servers only require the +"prod"+ and +"ver"+ | |
| 97 annotations, which should be set to the product name or identifier and product | |
| 98 version, respectively. It is unusual to specify other annotations as | |
| 99 process-level annotations via this argument. | |
| 100 | |
| 101 *--database*='PATH':: | |
| 102 Use 'PATH' as the path to the Crashpad crash report database. This option is | |
| 103 required. Crash reports are written to this database, and if uploads are | |
| 104 enabled, uploaded from this database to a crash report collection server. If the | |
| 105 database does not exist, it will be created, provided that the parent directory | |
| 106 of 'PATH' exists. | |
| 107 | |
| 108 *--handshake-fd*='FD':: | |
| 109 Perform the handshake with the initial client on the file descriptor at 'FD'. | |
| 110 Either this option or *--mach-service*, but not both, is required. This option | |
| 111 is only valid on OS X. | |
| 112 | |
| 113 *--initial-client-data*='HANDLE_request_crash_dump','HANDLE_request_non_crash_du
mp','HANDLE_non_crash_dump_completed','HANDLE_first_pipe_instance','HANDLE_clien
t_process','Address_crash_exception_information','Address_non_crash_exception_in
formation','Address_debug_critical_section':: | |
| 114 Register the initial client using the inherited handles and data provided. For | |
| 115 more information on the arguments, see the implementations of +CrashpadClient+ | |
| 116 and +ExceptionHandlerServer+. Either this option or *--pipe-name*, but not both, | |
| 117 is required. This option is only valid on Windows. | |
| 118 + | |
| 119 When this option is present, the server creates a new named pipe at a random | |
| 120 name and informs its client of the name. The server waits for at least one | |
| 121 client to register, and exits when all clients have exited, after waiting for | |
| 122 any uploads in progress to complete. | |
| 123 | |
| 124 *--mach-service*='SERVICE':: | |
| 125 Check in with the bootstrap server under the name 'SERVICE'. Either this option | |
| 126 or *--handshake-fd*, but not both, is required. This option is only valid on OS | |
| 127 X. | |
| 128 + | |
| 129 'SERVICE' may already be reserved with the bootstrap server in cases where this | |
| 130 tool is started by launchd(8) as a result of a message being sent to a service | |
| 131 declared in a job’s +MachServices+ dictionary (see launchd.plist(5)). The | |
| 132 service name may also be completely unknown to the system. | |
| 133 | |
| 134 *--no-rate-limit*:: | |
| 135 Do not rate limit the upload of crash reports. By default uploads are throttled | |
| 136 to one per hour. Using this option disables that behavior, and Crashpad will | |
| 137 attempt to upload all captured reports. | |
| 138 | |
| 139 *--pipe-name*='PIPE':: | |
| 140 Listen on the given pipe name for connections from clients. 'PIPE' must be of | |
| 141 the form +\\.\pipe\<somename>+. Either this option or *--initial-client-data*, | |
| 142 but not both, is required. This option is only valid on Windows. | |
| 143 + | |
| 144 When this option is present, the server creates a named pipe at 'PIPE', a name | |
| 145 known to both the server and its clients. The server continues running even | |
| 146 after all clients have exited. | |
| 147 | |
| 148 *--reset-own-crash-exception-port-to-system-default*:: | |
| 149 Causes the exception handler server to set its own crash handler to the system | |
| 150 default before beginning operation. This is only expected to be useful in cases | |
| 151 where the server inherits an inappropriate crash handler from its parent | |
| 152 process. This option is only valid on OS X. Use of this option is discouraged. | |
| 153 It should not be used absent extraordinary circumstances. | |
| 154 | |
| 155 *--url*='URL':: | |
| 156 If uploads are enabled, sends crash reports to the Breakpad-type crash report | |
| 157 collection server at 'URL'. Uploads are disabled by default, and can only be | |
| 158 enabled for a database by a Crashpad client using the Crashpad client library, | |
| 159 typically in response to a user requesting this behavior. If this option is not | |
| 160 specified, this program will behave as if uploads are disabled. | |
| 161 | |
| 162 *--help*:: | |
| 163 Display help and exit. | |
| 164 | |
| 165 *--version*:: | |
| 166 Output version information and exit. | |
| 167 | |
| 168 == Exit Status | |
| 169 | |
| 170 *0*:: | |
| 171 Success. | |
| 172 | |
| 173 *1*:: | |
| 174 Failure, with a message printed to the standard error stream. | |
| 175 | |
| 176 == See Also | |
| 177 | |
| 178 man_link:catch_exception_tool[1], | |
| 179 man_link:crashpad_database_util[1], | |
| 180 man_link:generate_dump[1], | |
| 181 man_link:run_with_crashpad[1] | |
| 182 | |
| 183 include::../doc/support/man_footer.ad[] | |
| OLD | NEW |