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, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #include "util/test/multiprocess.h" | 15 #include "test/multiprocess.h" |
16 | 16 |
17 #include <signal.h> | 17 #include <signal.h> |
18 #include <stdlib.h> | 18 #include <stdlib.h> |
19 #include <sys/wait.h> | 19 #include <sys/wait.h> |
20 #include <unistd.h> | 20 #include <unistd.h> |
21 | 21 |
22 #include <string> | 22 #include <string> |
23 | 23 |
24 #include "base/auto_reset.h" | 24 #include "base/auto_reset.h" |
25 #include "base/files/scoped_file.h" | 25 #include "base/files/scoped_file.h" |
26 #include "base/logging.h" | 26 #include "base/logging.h" |
27 #include "base/memory/scoped_ptr.h" | 27 #include "base/memory/scoped_ptr.h" |
28 #include "base/posix/eintr_wrapper.h" | 28 #include "base/posix/eintr_wrapper.h" |
29 #include "base/strings/stringprintf.h" | 29 #include "base/strings/stringprintf.h" |
30 #include "gtest/gtest.h" | 30 #include "gtest/gtest.h" |
| 31 #include "test/errors.h" |
31 #include "util/misc/scoped_forbid_return.h" | 32 #include "util/misc/scoped_forbid_return.h" |
32 #include "util/test/errors.h" | |
33 | 33 |
34 namespace crashpad { | 34 namespace crashpad { |
35 namespace test { | 35 namespace test { |
36 | 36 |
37 namespace internal { | 37 namespace internal { |
38 | 38 |
39 struct MultiprocessInfo { | 39 struct MultiprocessInfo { |
40 MultiprocessInfo() | 40 MultiprocessInfo() |
41 : pipe_c2p_read(-1), | 41 : pipe_c2p_read(-1), |
42 pipe_c2p_write(-1), | 42 pipe_c2p_write(-1), |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Trigger the ScopedForbidReturn destructor. | 211 // Trigger the ScopedForbidReturn destructor. |
212 return; | 212 return; |
213 } | 213 } |
214 | 214 |
215 // In a forked child, exit() is unsafe. Use _exit() instead. | 215 // In a forked child, exit() is unsafe. Use _exit() instead. |
216 _exit(EXIT_SUCCESS); | 216 _exit(EXIT_SUCCESS); |
217 } | 217 } |
218 | 218 |
219 } // namespace test | 219 } // namespace test |
220 } // namespace crashpad | 220 } // namespace crashpad |
OLD | NEW |