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

Unified Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 1692183005: Use the suid helper for oom_score_adj on Chrome OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index f439e0690da19ffecebbc5912d838b969e6ed791..5c964c531d3a946159c5997f2f8dc27658f1e483 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -163,6 +163,14 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
use_suid_sandbox_for_adj_oom_score_ =
!sandbox_binary_.empty() && using_suid_sandbox;
+#if defined(OS_CHROMEOS)
+ // Chrome OS has a kernel patch that restricts oom_score_adj. See
+ // crbug.com/576409 for details.
+ if (!sandbox_binary_.empty() && using_namespace_sandbox) {
+ use_suid_sandbox_for_adj_oom_score_ = true;
+ }
+#endif
+
// Start up the sandbox host process and get the file descriptor for the
// renderers to talk to it.
const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698