| Index: runtime/bin/eventhandler_macos.cc
|
| diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
|
| index 3954190ffaf7845a6e82894d43aa39b834381efd..51f1e70bba0705edac949befb45e35400eb02467 100644
|
| --- a/runtime/bin/eventhandler_macos.cc
|
| +++ b/runtime/bin/eventhandler_macos.cc
|
| @@ -123,6 +123,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;
|
| @@ -131,6 +133,7 @@ EventHandlerImplementation::EventHandlerImplementation()
|
| if (kqueue_fd_ == -1) {
|
| FATAL("Failed creating kqueue");
|
| }
|
| + FDUtils::SetCloseOnExec(kqueue_fd_);
|
| // Register the interrupt_fd with the kqueue.
|
| struct kevent event;
|
| EV_SET(&event, interrupt_fds_[0], EVFILT_READ, EV_ADD, 0, 0, NULL);
|
|
|