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

Unified Diff: runtime/bin/process_linux.cc

Issue 11644017: Set close-on-exec flag on pipe() and epoll() file descriptors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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_android.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_linux.cc
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index 01b17a9a9d442e80343e50f9588a0dfafdba905c..cd712677e9522bcb7666d8ea8f43b439dd5bbe19 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -125,6 +125,8 @@ class ExitCodeHandler {
if (result < 0) {
return false;
}
+ FDUtils::SetCloseOnExec(sig_chld_fds_[0]);
+ FDUtils::SetCloseOnExec(sig_chld_fds_[1]);
// Start thread that polls the pipe and handles process exits when
// data is received on the pipe.
@@ -482,6 +484,8 @@ int Process::Start(const char* path,
Log::PrintErr("Error pipe creation failed: %s\n", *os_error_message);
return errno;
}
+ FDUtils::SetCloseOnExec(event_fds[0]);
+ FDUtils::SetCloseOnExec(event_fds[1]);
ProcessInfoList::AddProcess(pid, event_fds[1]);
*exit_event = event_fds[0];
« no previous file with comments | « runtime/bin/process_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698