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

Side by Side Diff: base/process_util.h

Issue 14504: Get render_process_host to build on Linux by butchering a bunch of files. (Closed)
Patch Set: re-upload Created 11 years, 11 months 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Returns false if all processes were able to be killed off, false if at least 134 // Returns false if all processes were able to be killed off, false if at least
135 // one couldn't be killed. 135 // one couldn't be killed.
136 bool KillProcesses(const std::wstring& executable_name, int exit_code, 136 bool KillProcesses(const std::wstring& executable_name, int exit_code,
137 const ProcessFilter* filter); 137 const ProcessFilter* filter);
138 138
139 // Attempts to kill the process identified by the given process 139 // Attempts to kill the process identified by the given process
140 // entry structure, giving it the specified exit code. If |wait| is true, wait 140 // entry structure, giving it the specified exit code. If |wait| is true, wait
141 // for the process to be actually terminated before returning. 141 // for the process to be actually terminated before returning.
142 // Returns true if this is successful, false otherwise. 142 // Returns true if this is successful, false otherwise.
143 bool KillProcess(int process_id, int exit_code, bool wait); 143 bool KillProcess(int process_id, int exit_code, bool wait);
144 #if defined(OS_WIN)
145 bool KillProcess(HANDLE process, int exit_code, bool wait);
146 #endif
144 147
145 // Get the termination status (exit code) of the process and return true if the 148 // Get the termination status (exit code) of the process and return true if the
146 // status indicates the process crashed. It is an error to call this if the 149 // status indicates the process crashed. It is an error to call this if the
147 // process hasn't terminated yet. 150 // process hasn't terminated yet.
148 bool DidProcessCrash(ProcessHandle handle); 151 bool DidProcessCrash(ProcessHandle handle);
149 152
150 // Waits for process to exit. In POSIX systems, if the process hasn't been 153 // Waits for process to exit. In POSIX systems, if the process hasn't been
151 // signaled then puts the exit code in |exit_code|; otherwise it's considered 154 // signaled then puts the exit code in |exit_code|; otherwise it's considered
152 // a failure. On Windows |exit_code| is always filled. Returns true on success, 155 // a failure. On Windows |exit_code| is always filled. Returns true on success,
153 // and closes |handle| in any case. 156 // and closes |handle| in any case.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // overflow. Has no effect if the OS doesn't provide the necessary facility. 338 // overflow. Has no effect if the OS doesn't provide the necessary facility.
336 void EnableTerminationOnHeapCorruption(); 339 void EnableTerminationOnHeapCorruption();
337 340
338 // If supported on the platform, and the user has sufficent rights, increase 341 // If supported on the platform, and the user has sufficent rights, increase
339 // the current process's scheduling priority to a high priority. 342 // the current process's scheduling priority to a high priority.
340 void RaiseProcessToHighPriority(); 343 void RaiseProcessToHighPriority();
341 344
342 } // namespace base 345 } // namespace base
343 346
344 #endif // BASE_PROCESS_UTIL_H_ 347 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_win.cc » ('j') | chrome/browser/renderer_host/browser_render_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698