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

Unified Diff: runtime/bin/process_macos.cc

Issue 1076093004: Make all of stdout/stderr/stdin pipes close-on-exec when spawing child processes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« runtime/bin/process_linux.cc ('K') | « runtime/bin/process_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_macos.cc
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index d24a5994ecfdb57ee1ded112f7ee564ea190f252..4ba17a94fd16b4aeb4c60944d1d835bd83da8611 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -392,6 +392,7 @@ class ProcessStarter {
return CleanupAndReturnError();
}
FDUtils::SetCloseOnExec(read_in_[0]);
+ FDUtils::SetCloseOnExec(read_in_[1]);
// For detached processes the pipe to connect stderr and stdin are not used.
if (mode_ != kDetached) {
@@ -400,11 +401,13 @@ class ProcessStarter {
return CleanupAndReturnError();
}
FDUtils::SetCloseOnExec(read_err_[0]);
+ FDUtils::SetCloseOnExec(read_err_[1]);
result = TEMP_FAILURE_RETRY(pipe(write_out_));
if (result < 0) {
return CleanupAndReturnError();
}
+ FDUtils::SetCloseOnExec(write_out_[0]);
FDUtils::SetCloseOnExec(write_out_[1]);
}
« runtime/bin/process_linux.cc ('K') | « runtime/bin/process_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698