| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // create and set, and that LaunchSynchronize will consume and destroy. | 206 // create and set, and that LaunchSynchronize will consume and destroy. |
| 207 typedef int* LaunchSynchronizationHandle; | 207 typedef int* LaunchSynchronizationHandle; |
| 208 #endif // defined(OS_MACOSX) | 208 #endif // defined(OS_MACOSX) |
| 209 | 209 |
| 210 // Options for launching a subprocess that are passed to LaunchProcess(). | 210 // Options for launching a subprocess that are passed to LaunchProcess(). |
| 211 // The default constructor constructs the object with default options. | 211 // The default constructor constructs the object with default options. |
| 212 struct LaunchOptions { | 212 struct LaunchOptions { |
| 213 LaunchOptions() : wait(false), | 213 LaunchOptions() : wait(false), |
| 214 #if defined(OS_WIN) | 214 #if defined(OS_WIN) |
| 215 start_hidden(false), inherit_handles(false), as_user(NULL), | 215 start_hidden(false), inherit_handles(false), as_user(NULL), |
| 216 empty_desktop_name(false) | 216 empty_desktop_name(false), job_handle(NULL) |
| 217 #else | 217 #else |
| 218 environ(NULL), fds_to_remap(NULL), new_process_group(false) | 218 environ(NULL), fds_to_remap(NULL), new_process_group(false) |
| 219 #if defined(OS_LINUX) | 219 #if defined(OS_LINUX) |
| 220 , clone_flags(0) | 220 , clone_flags(0) |
| 221 #endif // OS_LINUX | 221 #endif // OS_LINUX |
| 222 #if defined(OS_MACOSX) | 222 #if defined(OS_MACOSX) |
| 223 , synchronize(NULL) | 223 , synchronize(NULL) |
| 224 #endif // defined(OS_MACOSX) | 224 #endif // defined(OS_MACOSX) |
| 225 #endif // !defined(OS_WIN) | 225 #endif // !defined(OS_WIN) |
| 226 {} | 226 {} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 238 // Whether the application is visible on the interactive desktop depends on | 238 // Whether the application is visible on the interactive desktop depends on |
| 239 // the token belonging to an interactive logon session. | 239 // the token belonging to an interactive logon session. |
| 240 // | 240 // |
| 241 // To avoid hard to diagnose problems, when specified this loads the | 241 // To avoid hard to diagnose problems, when specified this loads the |
| 242 // environment variables associated with the user and if this operation fails | 242 // environment variables associated with the user and if this operation fails |
| 243 // the entire call fails as well. | 243 // the entire call fails as well. |
| 244 UserTokenHandle as_user; | 244 UserTokenHandle as_user; |
| 245 | 245 |
| 246 // If true, use an empty string for the desktop name. | 246 // If true, use an empty string for the desktop name. |
| 247 bool empty_desktop_name; | 247 bool empty_desktop_name; |
| 248 |
| 249 // If non-NULL, launches the application in that job object. |
| 250 HANDLE job_handle; |
| 248 #else | 251 #else |
| 249 // If non-NULL, set/unset environment variables. | 252 // If non-NULL, set/unset environment variables. |
| 250 // See documentation of AlterEnvironment(). | 253 // See documentation of AlterEnvironment(). |
| 251 // This pointer is owned by the caller and must live through the | 254 // This pointer is owned by the caller and must live through the |
| 252 // call to LaunchProcess(). | 255 // call to LaunchProcess(). |
| 253 const environment_vector* environ; | 256 const environment_vector* environ; |
| 254 | 257 |
| 255 // If non-NULL, remap file descriptors according to the mapping of | 258 // If non-NULL, remap file descriptors according to the mapping of |
| 256 // src fd->dest fd to propagate FDs into the child process. | 259 // src fd->dest fd to propagate FDs into the child process. |
| 257 // This pointer is owned by the caller and must live through the | 260 // This pointer is owned by the caller and must live through the |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 // instance running inside the parent. The parent's Breakpad instance should | 772 // instance running inside the parent. The parent's Breakpad instance should |
| 770 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 773 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
| 771 // in the child after forking will restore the standard exception handler. | 774 // in the child after forking will restore the standard exception handler. |
| 772 // See http://crbug.com/20371/ for more details. | 775 // See http://crbug.com/20371/ for more details. |
| 773 void RestoreDefaultExceptionHandler(); | 776 void RestoreDefaultExceptionHandler(); |
| 774 #endif // defined(OS_MACOSX) | 777 #endif // defined(OS_MACOSX) |
| 775 | 778 |
| 776 } // namespace base | 779 } // namespace base |
| 777 | 780 |
| 778 #endif // BASE_PROCESS_UTIL_H_ | 781 #endif // BASE_PROCESS_UTIL_H_ |
| OLD | NEW |