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

Unified Diff: content/browser/zygote_host_linux.cc

Issue 8341052: share all the needed linux code with OpenBSD in chrome and content (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove unused header Created 9 years, 2 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
Index: content/browser/zygote_host_linux.cc
diff --git a/content/browser/zygote_host_linux.cc b/content/browser/zygote_host_linux.cc
index a0ca2fc9b2b7254698e5d71b6fafc6fb08268630..19dddd24c7010def2b25489dfbe535839d2774d6 100644
--- a/content/browser/zygote_host_linux.cc
+++ b/content/browser/zygote_host_linux.cc
@@ -306,6 +306,7 @@ pid_t ZygoteHost::ForkRequest(
return base::kNullProcessHandle;
}
+#if !defined(OS_OPENBSD)
// This is just a starting score for a renderer or extension (the
// only types of processes that will be started this way). It will
// get adjusted as time goes on. (This is the same value as
@@ -313,10 +314,12 @@ pid_t ZygoteHost::ForkRequest(
// that's not something we can include here.)
const int kLowestRendererOomScore = 300;
AdjustRendererOOMScore(pid, kLowestRendererOomScore);
+#endif
return pid;
}
+#if !defined(OS_OPENBSD)
void ZygoteHost::AdjustRendererOOMScore(base::ProcessHandle pid, int score) {
// 1) You can't change the oom_score_adj of a non-dumpable process
// (EPERM) unless you're root. Because of this, we can't set the
@@ -383,6 +386,7 @@ void ZygoteHost::AdjustRendererOOMScore(base::ProcessHandle pid, int score) {
PLOG(ERROR) << "Failed to adjust OOM score of renderer with pid " << pid;
}
}
+#endif
void ZygoteHost::EnsureProcessTerminated(pid_t process) {
DCHECK(init_);

Powered by Google App Engine
This is Rietveld 408576698