OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with 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 | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 ToolSupport::UsageHint(me, "COMMAND is required"); | 159 ToolSupport::UsageHint(me, "COMMAND is required"); |
160 return kExitFailure; | 160 return kExitFailure; |
161 } | 161 } |
162 | 162 |
163 // Start the handler process and direct exceptions to it. | 163 // Start the handler process and direct exceptions to it. |
164 CrashpadClient crashpad_client; | 164 CrashpadClient crashpad_client; |
165 if (!crashpad_client.StartHandler(base::FilePath(options.handler), | 165 if (!crashpad_client.StartHandler(base::FilePath(options.handler), |
166 base::FilePath(options.database), | 166 base::FilePath(options.database), |
167 options.url, | 167 options.url, |
168 options.annotations, | 168 options.annotations, |
169 options.arguments)) { | 169 options.arguments, |
| 170 false)) { |
170 return kExitFailure; | 171 return kExitFailure; |
171 } | 172 } |
172 | 173 |
173 if (!crashpad_client.UseHandler()) { | 174 if (!crashpad_client.UseHandler()) { |
174 return kExitFailure; | 175 return kExitFailure; |
175 } | 176 } |
176 | 177 |
177 // Using the remaining arguments, start a new program with the new exception | 178 // Using the remaining arguments, start a new program with the new exception |
178 // port in effect. | 179 // port in effect. |
179 execvp(argv[0], argv); | 180 execvp(argv[0], argv); |
180 PLOG(ERROR) << "execvp " << argv[0]; | 181 PLOG(ERROR) << "execvp " << argv[0]; |
181 return errno == ENOENT ? kExitExecENOENT : kExitExecFailure; | 182 return errno == ENOENT ? kExitExecENOENT : kExitExecFailure; |
182 } | 183 } |
183 | 184 |
184 } // namespace | 185 } // namespace |
185 } // namespace crashpad | 186 } // namespace crashpad |
186 | 187 |
187 int main(int argc, char* argv[]) { | 188 int main(int argc, char* argv[]) { |
188 return crashpad::RunWithCrashpadMain(argc, argv); | 189 return crashpad::RunWithCrashpadMain(argc, argv); |
189 } | 190 } |
OLD | NEW |