diff options
author | bradchen@google.com <bradchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 23:50:40 +0000 |
---|---|---|
committer | bradchen@google.com <bradchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 23:50:40 +0000 |
commit | 5b99724ed67011e9ef4231ec2796a5237cdf8e88 (patch) | |
tree | f463db20eff57bcb29e32564610b0389597ea1a2 /content/browser/zygote_host_linux.cc | |
parent | 95343df7917bc58e87e6455449fbfa2461ceb37c (diff) | |
download | chromium_src-5b99724ed67011e9ef4231ec2796a5237cdf8e88.zip chromium_src-5b99724ed67011e9ef4231ec2796a5237cdf8e88.tar.gz chromium_src-5b99724ed67011e9ef4231ec2796a5237cdf8e88.tar.bz2 |
New NaCl zygote implementation 2, in which Chrome zygote forks a NaCl helper.
This patch can launch earth_c.html with and without the SUID sandbox. It is enabled with the environment variable NACL_NEW_ZYGOTE.
BUG=nativeclient:480
TEST=nativeclient in-browser tests on Linux, ChromeOS
Review URL: http://codereview.chromium.org/6995121
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/zygote_host_linux.cc')
-rw-r--r-- | content/browser/zygote_host_linux.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/content/browser/zygote_host_linux.cc b/content/browser/zygote_host_linux.cc index 328c603..16cc514 100644 --- a/content/browser/zygote_host_linux.cc +++ b/content/browser/zygote_host_linux.cc @@ -58,8 +58,7 @@ ZygoteHost::ZygoteHost() init_(false), using_suid_sandbox_(false), have_read_sandbox_status_word_(false), - sandbox_status_(0) { -} + sandbox_status_(0) {} ZygoteHost::~ZygoteHost() { if (init_) @@ -110,6 +109,7 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) { switches::kRegisterPepperPlugins, switches::kDisableSeccompSandbox, switches::kEnableSeccompSandbox, + switches::kNaClLinuxHelper, }; cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, arraysize(kForwardSwitches)); @@ -221,13 +221,15 @@ ssize_t ZygoteHost::ReadReply(void* buf, size_t buf_len) { return HANDLE_EINTR(read(control_fd_, buf, buf_len)); } -pid_t ZygoteHost::ForkRenderer( +pid_t ZygoteHost::ForkRequest( const std::vector<std::string>& argv, - const base::GlobalDescriptors::Mapping& mapping) { + const base::GlobalDescriptors::Mapping& mapping, + const std::string& process_type) { DCHECK(init_); Pickle pickle; pickle.WriteInt(kCmdFork); + pickle.WriteString(process_type); pickle.WriteInt(argv.size()); for (std::vector<std::string>::const_iterator i = argv.begin(); i != argv.end(); ++i) |