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

Unified Diff: base/process_util_posix.cc

Issue 7230057: Revert 90805 - I am submitting this with LGTMs from agl@ and evanm@. I'm marking this as TBR=jam@... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_util.h ('k') | chrome/app/chrome_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
===================================================================
--- base/process_util_posix.cc (revision 90812)
+++ base/process_util_posix.cc (working copy)
@@ -508,25 +508,15 @@
const file_handle_mapping_vector& fds_to_remap,
bool wait,
ProcessHandle* process_handle,
- bool start_new_process_group,
- bool use_clone,
- int clone_flags) {
- pid_t pid = -1;
+ bool start_new_process_group) {
+ pid_t pid;
InjectiveMultimap fd_shuffle1, fd_shuffle2;
fd_shuffle1.reserve(fds_to_remap.size());
fd_shuffle2.reserve(fds_to_remap.size());
scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
scoped_array<char*> new_environ(AlterEnvironment(env_changes, environ));
- if (use_clone) {
-#if defined(OS_LINUX)
- pid = syscall(__NR_clone, clone_flags, 0, 0, 0);
-#else
- NOTREACHED() << "Tried to use clone() on non-Linux system.";
-#endif
- } else {
- pid = fork();
- }
+ pid = fork();
if (pid < 0) {
PLOG(ERROR) << "fork";
return false;
@@ -627,10 +617,7 @@
bool wait,
ProcessHandle* process_handle) {
return LaunchAppImpl(argv, env_changes, fds_to_remap,
- wait, process_handle,
- false, // don't start new process group
- false, // don't use clone()
- 0); // clone flags
+ wait, process_handle, false);
}
bool LaunchAppInNewProcessGroup(
@@ -640,23 +627,9 @@
bool wait,
ProcessHandle* process_handle) {
return LaunchAppImpl(argv, env_changes, fds_to_remap, wait,
- process_handle,
- true, // start new process group
- false, // don't use clone()
- 0); // clone flags
+ process_handle, true);
}
-BASE_API bool LaunchAppWithClone(const std::vector<std::string>& argv,
- const file_handle_mapping_vector& fds_to_remap,
- bool wait, ProcessHandle* process_handle,
- int clone_flags) {
- base::environment_vector no_env;
- return LaunchAppImpl(argv, no_env, fds_to_remap, wait, process_handle,
- false, // don't start new process group
- true, // use clone()
- clone_flags);
-}
-
bool LaunchApp(const std::vector<std::string>& argv,
const file_handle_mapping_vector& fds_to_remap,
bool wait, ProcessHandle* process_handle) {
Property changes on: base/process_util_posix.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « base/process_util.h ('k') | chrome/app/chrome_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698