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

Side by Side Diff: base/process/launch.h

Issue 831373002: Move ForkWithFlags from sandbox/ to base/ and plug it into LaunchProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 5 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
« no previous file with comments | « no previous file | base/process/launch_posix.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 contains functions for launching subprocesses. 5 // This file contains functions for launching subprocesses.
6 6
7 #ifndef BASE_PROCESS_LAUNCH_H_ 7 #ifndef BASE_PROCESS_LAUNCH_H_
8 #define BASE_PROCESS_LAUNCH_H_ 8 #define BASE_PROCESS_LAUNCH_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // the call to LaunchProcess(). 108 // the call to LaunchProcess().
109 const std::vector<int>* maximize_rlimits; 109 const std::vector<int>* maximize_rlimits;
110 110
111 // If true, start the process in a new process group, instead of 111 // If true, start the process in a new process group, instead of
112 // inheriting the parent's process group. The pgid of the child process 112 // inheriting the parent's process group. The pgid of the child process
113 // will be the same as its pid. 113 // will be the same as its pid.
114 bool new_process_group; 114 bool new_process_group;
115 115
116 #if defined(OS_LINUX) 116 #if defined(OS_LINUX)
117 // If non-zero, start the process using clone(), using flags as provided. 117 // If non-zero, start the process using clone(), using flags as provided.
118 // Unlike in clone, clone_flags may not contain a custom termination signal
119 // that is sent to the parent when the child dies. The termination signal will
120 // always be set to SIGCHLD.
118 int clone_flags; 121 int clone_flags;
119 122
120 // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If 123 // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
121 // true, then this bit will not be set in the new child process. 124 // true, then this bit will not be set in the new child process.
122 bool allow_new_privs; 125 bool allow_new_privs;
123 #endif // defined(OS_LINUX) 126 #endif // defined(OS_LINUX)
124 127
125 #if defined(OS_CHROMEOS) 128 #if defined(OS_CHROMEOS)
126 // If non-negative, the specified file descriptor will be set as the launched 129 // If non-negative, the specified file descriptor will be set as the launched
127 // process' controlling terminal. 130 // process' controlling terminal.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 void ReplaceBootstrapPort(const std::string& replacement_bootstrap_name); 266 void ReplaceBootstrapPort(const std::string& replacement_bootstrap_name);
264 #endif // defined(OS_MACOSX) 267 #endif // defined(OS_MACOSX)
265 268
266 // Creates a LaunchOptions object suitable for launching processes in a test 269 // Creates a LaunchOptions object suitable for launching processes in a test
267 // binary. This should not be called in production/released code. 270 // binary. This should not be called in production/released code.
268 BASE_EXPORT LaunchOptions LaunchOptionsForTest(); 271 BASE_EXPORT LaunchOptions LaunchOptionsForTest();
269 272
270 } // namespace base 273 } // namespace base
271 274
272 #endif // BASE_PROCESS_LAUNCH_H_ 275 #endif // BASE_PROCESS_LAUNCH_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/launch_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698