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

Side by Side Diff: base/process_util.h

Issue 7789018: Move launching in a job object logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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
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
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
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_
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