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

Unified Diff: base/process/launch_posix.cc

Issue 253803002: Switch from a DCHECK to RAW_LOG in base::LaunchProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FATAL instead Created 6 years, 8 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: base/process/launch_posix.cc
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index fe4da1a782d5ed55d58a84cc751efe1e2455d4a9..457234f5b790a2b118a2e83d41212b9c9b8d6080 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -435,8 +435,9 @@ bool LaunchProcess(const std::vector<std::string>& argv,
#define PR_SET_NO_NEW_PRIVS 38
#endif
if (!options.allow_new_privs) {
- if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {
- DCHECK_EQ(EINVAL, errno);
+ if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) && errno != EINVAL) {
+ // Only log if the error is not EINVAL (i.e. not supported).
+ RAW_LOG(FATAL, "prctl(PR_SET_NO_NEW_PRIVS) failed");
}
}
#endif
« 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