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

Unified Diff: runtime/bin/eventhandler_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/eventhandler_android.cc ('k') | runtime/bin/process_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_linux.cc
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 49b6ca1fbde17405c9e9cda4977625efa93b62c8..869e8bbd2b3b75c9bc18a3e4b4d52e4a82842f0d 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -105,6 +105,8 @@ EventHandlerImplementation::EventHandlerImplementation()
FATAL("Pipe creation failed");
}
FDUtils::SetNonBlocking(interrupt_fds_[0]);
+ FDUtils::SetCloseOnExec(interrupt_fds_[0]);
+ FDUtils::SetCloseOnExec(interrupt_fds_[1]);
timeout_ = kInfinityTimeout;
timeout_port_ = 0;
shutdown_ = false;
@@ -115,6 +117,7 @@ EventHandlerImplementation::EventHandlerImplementation()
if (epoll_fd_ == -1) {
FATAL("Failed creating epoll file descriptor");
}
+ FDUtils::SetCloseOnExec(epoll_fd_);
// Register the interrupt_fd with the epoll instance.
struct epoll_event event;
event.events = EPOLLIN;
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/process_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698