From 39c53c8ac913042ed719085296c532a68ac68ee4 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Mon, 17 Dec 2018 08:51:38 -0800 Subject: use epoll_create1 epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC) instead. Bug: 120983106 Test: compiles and boots Change-Id: I91f213ebb2dd05330dd25ec1ca1fec59b611e7f2 --- minui/events.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minui/events.cpp b/minui/events.cpp index 2894c3b6b..d94e97723 100644 --- a/minui/events.cpp +++ b/minui/events.cpp @@ -55,7 +55,7 @@ static bool test_bit(size_t bit, unsigned long* array) { // NOLINT } int ev_init(ev_callback input_cb, bool allow_touch_inputs) { - g_epoll_fd = epoll_create(MAX_DEVICES + MAX_MISC_FDS); + g_epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (g_epoll_fd == -1) { return -1; } -- cgit v1.2.3