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

Commit d5ddc60e authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "healthd_common.cpp: use epoll_create1" am: 1eebae45 am: 8343cb07

am: 64ec2acd

Change-Id: I8cdd6d8254046d263ec52d9e51bc5d7f8c6cd682
parents 1bf027f7 64ec2acd
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -67,8 +67,6 @@ static int epollfd;

#define POWER_SUPPLY_SUBSYSTEM "power_supply"

// epoll_create() parameter is actually unused
#define MAX_EPOLL_EVENTS 40
static int uevent_fd;
static int wakealarm_fd;

@@ -240,9 +238,9 @@ static void healthd_mainloop(void) {
}

static int healthd_init() {
    epollfd = epoll_create(MAX_EPOLL_EVENTS);
    epollfd = epoll_create1(EPOLL_CLOEXEC);
    if (epollfd == -1) {
        KLOG_ERROR(LOG_TAG, "epoll_create failed; errno=%d\n", errno);
        KLOG_ERROR(LOG_TAG, "epoll_create1 failed; errno=%d\n", errno);
        return -1;
    }