OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file/namespace contains utility functions for enumerating, ending and | 5 // This file/namespace contains utility functions for enumerating, ending and |
6 // computing statistics of processes. | 6 // computing statistics of processes. |
7 | 7 |
8 #ifndef BASE_PROCESS_UTIL_H_ | 8 #ifndef BASE_PROCESS_UTIL_H_ |
9 #define BASE_PROCESS_UTIL_H_ | 9 #define BASE_PROCESS_UTIL_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 enum TerminationStatus { | 128 enum TerminationStatus { |
129 TERMINATION_STATUS_NORMAL_TERMINATION, // zero exit status | 129 TERMINATION_STATUS_NORMAL_TERMINATION, // zero exit status |
130 TERMINATION_STATUS_ABNORMAL_TERMINATION, // non-zero exit status | 130 TERMINATION_STATUS_ABNORMAL_TERMINATION, // non-zero exit status |
131 TERMINATION_STATUS_PROCESS_WAS_KILLED, // e.g. SIGKILL or task manager kill | 131 TERMINATION_STATUS_PROCESS_WAS_KILLED, // e.g. SIGKILL or task manager kill |
132 TERMINATION_STATUS_PROCESS_CRASHED, // e.g. Segmentation fault | 132 TERMINATION_STATUS_PROCESS_CRASHED, // e.g. Segmentation fault |
133 TERMINATION_STATUS_STILL_RUNNING, // child hasn't exited yet | 133 TERMINATION_STATUS_STILL_RUNNING, // child hasn't exited yet |
134 TERMINATION_STATUS_MAX_ENUM | 134 TERMINATION_STATUS_MAX_ENUM |
135 }; | 135 }; |
136 | 136 |
137 #if defined(USE_LINUX_BREAKPAD) | 137 #if defined(USE_LINUX_BREAKPAD) |
138 extern size_t g_oom_size; | 138 BASE_EXPORT extern size_t g_oom_size; |
139 #endif | 139 #endif |
140 | 140 |
141 // Returns the id of the current process. | 141 // Returns the id of the current process. |
142 BASE_EXPORT ProcessId GetCurrentProcId(); | 142 BASE_EXPORT ProcessId GetCurrentProcId(); |
143 | 143 |
144 // Returns the ProcessHandle of the current process. | 144 // Returns the ProcessHandle of the current process. |
145 BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); | 145 BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); |
146 | 146 |
147 #if defined(OS_WIN) | 147 #if defined(OS_WIN) |
148 // Returns the module handle to which an address belongs. | 148 // Returns the module handle to which an address belongs. |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 // instance running inside the parent. The parent's Breakpad instance should | 835 // instance running inside the parent. The parent's Breakpad instance should |
836 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 836 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
837 // in the child after forking will restore the standard exception handler. | 837 // in the child after forking will restore the standard exception handler. |
838 // See http://crbug.com/20371/ for more details. | 838 // See http://crbug.com/20371/ for more details. |
839 void RestoreDefaultExceptionHandler(); | 839 void RestoreDefaultExceptionHandler(); |
840 #endif // defined(OS_MACOSX) | 840 #endif // defined(OS_MACOSX) |
841 | 841 |
842 } // namespace base | 842 } // namespace base |
843 | 843 |
844 #endif // BASE_PROCESS_UTIL_H_ | 844 #endif // BASE_PROCESS_UTIL_H_ |
OLD | NEW |