use epoll_create1
epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC)
instead.
Bug: 120983106
Test: compiles and boots
Change-Id: I59cebb997de9d8b99804cc45a962751976d07ce6
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index 73c2eba..2dd86ba 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -1295,7 +1295,7 @@
}
IPCThreadState::self()->flushCommands(); // flush BC_ENTER_LOOPER
- epoll_fd = epoll_create1(0);
+ epoll_fd = epoll_create1(EPOLL_CLOEXEC);
if (epoll_fd == -1) {
return 1;
}