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 | 10 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 #if defined(USE_LINUX_BREAKPAD) | 140 #if defined(USE_LINUX_BREAKPAD) |
141 BASE_EXPORT extern size_t g_oom_size; | 141 BASE_EXPORT extern size_t g_oom_size; |
142 #endif | 142 #endif |
143 | 143 |
144 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
145 // Output multi-process printf, cout, cerr, etc to the cmd.exe console that ran | 145 // Output multi-process printf, cout, cerr, etc to the cmd.exe console that ran |
146 // chrome. This is not thread-safe: only call from main thread. | 146 // chrome. This is not thread-safe: only call from main thread. |
147 BASE_EXPORT void RouteStdioToConsole(); | 147 BASE_EXPORT void RouteStdioToConsole(); |
148 #endif | 148 #endif |
149 | 149 |
| 150 #if defined(OS_POSIX) |
| 151 // Ignores SIGPIPE signal. We handle pipe errors in a different way. |
| 152 // Returns true on success. |
| 153 BASE_EXPORT bool IgnoreSigPipe() WARN_UNUSED_RESULT; |
| 154 #endif |
| 155 |
150 // Returns the id of the current process. | 156 // Returns the id of the current process. |
151 BASE_EXPORT ProcessId GetCurrentProcId(); | 157 BASE_EXPORT ProcessId GetCurrentProcId(); |
152 | 158 |
153 // Returns the ProcessHandle of the current process. | 159 // Returns the ProcessHandle of the current process. |
154 BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); | 160 BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); |
155 | 161 |
156 #if defined(OS_WIN) | 162 #if defined(OS_WIN) |
157 // Returns the module handle to which an address belongs. The reference count | 163 // Returns the module handle to which an address belongs. The reference count |
158 // of the module is not incremented. | 164 // of the module is not incremented. |
159 BASE_EXPORT HMODULE GetModuleFromAddress(void* address); | 165 BASE_EXPORT HMODULE GetModuleFromAddress(void* address); |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. | 880 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
875 // | 881 // |
876 // TODO(shess): Weird place to put it, but this is where the OOM | 882 // TODO(shess): Weird place to put it, but this is where the OOM |
877 // killer currently lives. | 883 // killer currently lives. |
878 BASE_EXPORT void* UncheckedMalloc(size_t size); | 884 BASE_EXPORT void* UncheckedMalloc(size_t size); |
879 #endif // defined(OS_MACOSX) | 885 #endif // defined(OS_MACOSX) |
880 | 886 |
881 } // namespace base | 887 } // namespace base |
882 | 888 |
883 #endif // BASE_PROCESS_UTIL_H_ | 889 #endif // BASE_PROCESS_UTIL_H_ |
OLD | NEW |