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

Side by Side Diff: base/process_util.h

Issue 10914277: Add a flag force_breakaway_from_job_ to the base::LaunchOptions structure for Windows, which (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/process_util_win.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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // create and set, and that LaunchSynchronize will consume and destroy. 226 // create and set, and that LaunchSynchronize will consume and destroy.
227 typedef int* LaunchSynchronizationHandle; 227 typedef int* LaunchSynchronizationHandle;
228 #endif // defined(OS_MACOSX) 228 #endif // defined(OS_MACOSX)
229 229
230 // Options for launching a subprocess that are passed to LaunchProcess(). 230 // Options for launching a subprocess that are passed to LaunchProcess().
231 // The default constructor constructs the object with default options. 231 // The default constructor constructs the object with default options.
232 struct LaunchOptions { 232 struct LaunchOptions {
233 LaunchOptions() : wait(false), 233 LaunchOptions() : wait(false),
234 #if defined(OS_WIN) 234 #if defined(OS_WIN)
235 start_hidden(false), inherit_handles(false), as_user(NULL), 235 start_hidden(false), inherit_handles(false), as_user(NULL),
236 empty_desktop_name(false), job_handle(NULL) 236 empty_desktop_name(false), job_handle(NULL),
237 force_breakaway_from_job_(false)
237 #else 238 #else
238 environ(NULL), fds_to_remap(NULL), maximize_rlimits(NULL), 239 environ(NULL), fds_to_remap(NULL), maximize_rlimits(NULL),
239 new_process_group(false) 240 new_process_group(false)
240 #if defined(OS_LINUX) 241 #if defined(OS_LINUX)
241 , clone_flags(0) 242 , clone_flags(0)
242 #endif // OS_LINUX 243 #endif // OS_LINUX
243 #if defined(OS_CHROMEOS) 244 #if defined(OS_CHROMEOS)
244 , ctrl_terminal_fd(-1) 245 , ctrl_terminal_fd(-1)
245 #endif // OS_CHROMEOS 246 #endif // OS_CHROMEOS
246 #if defined(OS_MACOSX) 247 #if defined(OS_MACOSX)
(...skipping 20 matching lines...) Expand all
267 // the entire call fails as well. 268 // the entire call fails as well.
268 UserTokenHandle as_user; 269 UserTokenHandle as_user;
269 270
270 // If true, use an empty string for the desktop name. 271 // If true, use an empty string for the desktop name.
271 bool empty_desktop_name; 272 bool empty_desktop_name;
272 273
273 // If non-NULL, launches the application in that job object. The process will 274 // If non-NULL, launches the application in that job object. The process will
274 // be terminated immediately and LaunchProcess() will fail if assignment to 275 // be terminated immediately and LaunchProcess() will fail if assignment to
275 // the job object fails. 276 // the job object fails.
276 HANDLE job_handle; 277 HANDLE job_handle;
278
279 // If set to true, ensures that the child process is launched with the
280 // CREATE_BREAKAWAY_FROM_JOB flag which allows it to breakout of the parent
281 // job if any.
282 bool force_breakaway_from_job_;
277 #else 283 #else
278 // If non-NULL, set/unset environment variables. 284 // If non-NULL, set/unset environment variables.
279 // See documentation of AlterEnvironment(). 285 // See documentation of AlterEnvironment().
280 // This pointer is owned by the caller and must live through the 286 // This pointer is owned by the caller and must live through the
281 // call to LaunchProcess(). 287 // call to LaunchProcess().
282 const EnvironmentVector* environ; 288 const EnvironmentVector* environ;
283 289
284 // If non-NULL, remap file descriptors according to the mapping of 290 // If non-NULL, remap file descriptors according to the mapping of
285 // src fd->dest fd to propagate FDs into the child process. 291 // src fd->dest fd to propagate FDs into the child process.
286 // This pointer is owned by the caller and must live through the 292 // This pointer is owned by the caller and must live through the
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 // instance running inside the parent. The parent's Breakpad instance should 858 // instance running inside the parent. The parent's Breakpad instance should
853 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 859 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
854 // in the child after forking will restore the standard exception handler. 860 // in the child after forking will restore the standard exception handler.
855 // See http://crbug.com/20371/ for more details. 861 // See http://crbug.com/20371/ for more details.
856 void RestoreDefaultExceptionHandler(); 862 void RestoreDefaultExceptionHandler();
857 #endif // defined(OS_MACOSX) 863 #endif // defined(OS_MACOSX)
858 864
859 } // namespace base 865 } // namespace base
860 866
861 #endif // BASE_PROCESS_UTIL_H_ 867 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698