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

Unified Diff: base/process/launch_posix.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « base/process/launch.cc ('k') | base/process/process.h » ('j') | 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 f9963fa8ee98a13b1ea34a3508a015f1c61ec745..77edc1283191c9a6ad77b9a323cbd9cdf7d00153 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -523,6 +523,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
RAW_LOG(FATAL, "prctl(PR_SET_NO_NEW_PRIVS) failed");
}
}
+
+ if (options.kill_on_parent_death) {
+ if (prctl(PR_SET_PDEATHSIG, SIGKILL) != 0) {
+ RAW_LOG(ERROR, "prctl(PR_SET_PDEATHSIG) failed");
+ _exit(127);
+ }
+ }
#endif
if (current_directory != nullptr) {
« no previous file with comments | « base/process/launch.cc ('k') | base/process/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698