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

Unified Diff: runtime/bin/process_macos.cc

Issue 251403004: Mark pipe as close-on-exec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « 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 0e82ce268031bfeff46f174210e18d008a0a23c4..6e8ed4651376331160eaac8c65364e72c43c3309 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -722,7 +722,9 @@ intptr_t Process::SetSignalHandler(intptr_t signal) {
if (NO_RETRY_EXPECTED(pipe(fds)) != 0) {
return -1;
}
- if (!FDUtils::SetNonBlocking(fds[0])) {
+ if (!FDUtils::SetCloseOnExec(fds[0]) ||
+ !FDUtils::SetCloseOnExec(fds[1]) ||
+ !FDUtils::SetNonBlocking(fds[0])) {
VOID_TEMP_FAILURE_RETRY(close(fds[0]));
VOID_TEMP_FAILURE_RETRY(close(fds[1]));
return -1;
« no previous file with comments | « runtime/bin/process_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698