Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba7a3478 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

use epoll_create1

epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC)
instead.

Bug: 120983106
Test: compiles and boots
Change-Id: I40abaaea6dad641dc03d141adb29e963e853edc4
parent b73b6cd5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ reactor_t* reactor_new(void) {
  ret->epoll_fd = INVALID_FD;
  ret->event_fd = INVALID_FD;

  ret->epoll_fd = epoll_create(MAX_EVENTS);
  ret->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
  if (ret->epoll_fd == INVALID_FD) {
    LOG_ERROR(LOG_TAG, "%s unable to create epoll instance: %s", __func__,
              strerror(errno));