Chromium Code Reviews| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 typedef int* LaunchSynchronizationHandle; | 230 typedef int* LaunchSynchronizationHandle; |
| 231 #endif // defined(OS_MACOSX) | 231 #endif // defined(OS_MACOSX) |
| 232 | 232 |
| 233 // Options for launching a subprocess that are passed to LaunchProcess(). | 233 // Options for launching a subprocess that are passed to LaunchProcess(). |
| 234 // The default constructor constructs the object with default options. | 234 // The default constructor constructs the object with default options. |
| 235 struct LaunchOptions { | 235 struct LaunchOptions { |
| 236 LaunchOptions() : wait(false), | 236 LaunchOptions() : wait(false), |
| 237 #if defined(OS_WIN) | 237 #if defined(OS_WIN) |
| 238 start_hidden(false), inherit_handles(false), as_user(NULL), | 238 start_hidden(false), inherit_handles(false), as_user(NULL), |
| 239 empty_desktop_name(false), job_handle(NULL), | 239 empty_desktop_name(false), job_handle(NULL), |
| 240 stdin_handle(kNullProcessHandle), | |
|
rvargas (doing something else)
2012/11/29 01:19:23
This is assigning a "process handle" to a file han
Sergey Ulanov
2012/12/01 01:23:00
Addressed this in crrev.com/11419267
| |
| 241 stdout_handle(kNullProcessHandle), | |
| 240 force_breakaway_from_job_(false) | 242 force_breakaway_from_job_(false) |
| 241 #else | 243 #else |
| 242 environ(NULL), fds_to_remap(NULL), maximize_rlimits(NULL), | 244 environ(NULL), fds_to_remap(NULL), maximize_rlimits(NULL), |
| 243 new_process_group(false) | 245 new_process_group(false) |
| 244 #if defined(OS_LINUX) | 246 #if defined(OS_LINUX) |
| 245 , clone_flags(0) | 247 , clone_flags(0) |
| 246 #endif // OS_LINUX | 248 #endif // OS_LINUX |
| 247 #if defined(OS_CHROMEOS) | 249 #if defined(OS_CHROMEOS) |
| 248 , ctrl_terminal_fd(-1) | 250 , ctrl_terminal_fd(-1) |
| 249 #endif // OS_CHROMEOS | 251 #endif // OS_CHROMEOS |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 272 UserTokenHandle as_user; | 274 UserTokenHandle as_user; |
| 273 | 275 |
| 274 // If true, use an empty string for the desktop name. | 276 // If true, use an empty string for the desktop name. |
| 275 bool empty_desktop_name; | 277 bool empty_desktop_name; |
| 276 | 278 |
| 277 // If non-NULL, launches the application in that job object. The process will | 279 // If non-NULL, launches the application in that job object. The process will |
| 278 // be terminated immediately and LaunchProcess() will fail if assignment to | 280 // be terminated immediately and LaunchProcess() will fail if assignment to |
| 279 // the job object fails. | 281 // the job object fails. |
| 280 HANDLE job_handle; | 282 HANDLE job_handle; |
| 281 | 283 |
| 284 // Handles for the redirection of stdin and/or stdout. | |
| 285 HANDLE stdin_handle; | |
| 286 HANDLE stdout_handle; | |
| 287 | |
| 282 // If set to true, ensures that the child process is launched with the | 288 // If set to true, ensures that the child process is launched with the |
| 283 // CREATE_BREAKAWAY_FROM_JOB flag which allows it to breakout of the parent | 289 // CREATE_BREAKAWAY_FROM_JOB flag which allows it to breakout of the parent |
| 284 // job if any. | 290 // job if any. |
| 285 bool force_breakaway_from_job_; | 291 bool force_breakaway_from_job_; |
| 286 #else | 292 #else |
| 287 // If non-NULL, set/unset environment variables. | 293 // If non-NULL, set/unset environment variables. |
| 288 // See documentation of AlterEnvironment(). | 294 // See documentation of AlterEnvironment(). |
| 289 // This pointer is owned by the caller and must live through the | 295 // This pointer is owned by the caller and must live through the |
| 290 // call to LaunchProcess(). | 296 // call to LaunchProcess(). |
| 291 const EnvironmentVector* environ; | 297 const EnvironmentVector* environ; |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 872 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. | 878 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
| 873 // | 879 // |
| 874 // TODO(shess): Weird place to put it, but this is where the OOM | 880 // TODO(shess): Weird place to put it, but this is where the OOM |
| 875 // killer currently lives. | 881 // killer currently lives. |
| 876 BASE_EXPORT void* UncheckedMalloc(size_t size); | 882 BASE_EXPORT void* UncheckedMalloc(size_t size); |
| 877 #endif // defined(OS_MACOSX) | 883 #endif // defined(OS_MACOSX) |
| 878 | 884 |
| 879 } // namespace base | 885 } // namespace base |
| 880 | 886 |
| 881 #endif // BASE_PROCESS_UTIL_H_ | 887 #endif // BASE_PROCESS_UTIL_H_ |
| OLD | NEW |