Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: base/process_util.h

Issue 11280010: Extract SIGPIPE ignoring code to a common place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/stack_trace_posix.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
willchan no longer on Chromium 2012/11/16 05:25:03 Please document the return value.
152 BASE_EXPORT bool IgnoreSigPipe() WARN_UNUSED_RESULT;
153 #endif
154
150 // Returns the id of the current process. 155 // Returns the id of the current process.
151 BASE_EXPORT ProcessId GetCurrentProcId(); 156 BASE_EXPORT ProcessId GetCurrentProcId();
152 157
153 // Returns the ProcessHandle of the current process. 158 // Returns the ProcessHandle of the current process.
154 BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); 159 BASE_EXPORT ProcessHandle GetCurrentProcessHandle();
155 160
156 #if defined(OS_WIN) 161 #if defined(OS_WIN)
157 // Returns the module handle to which an address belongs. The reference count 162 // Returns the module handle to which an address belongs. The reference count
158 // of the module is not incremented. 163 // of the module is not incremented.
159 BASE_EXPORT HMODULE GetModuleFromAddress(void* address); 164 BASE_EXPORT HMODULE GetModuleFromAddress(void* address);
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. 879 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU.
875 // 880 //
876 // TODO(shess): Weird place to put it, but this is where the OOM 881 // TODO(shess): Weird place to put it, but this is where the OOM
877 // killer currently lives. 882 // killer currently lives.
878 BASE_EXPORT void* UncheckedMalloc(size_t size); 883 BASE_EXPORT void* UncheckedMalloc(size_t size);
879 #endif // defined(OS_MACOSX) 884 #endif // defined(OS_MACOSX)
880 885
881 } // namespace base 886 } // namespace base
882 887
883 #endif // BASE_PROCESS_UTIL_H_ 888 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « base/debug/stack_trace_posix.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698