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 |