conmon: Add OOM eventfd to epoll monitoring list

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2017-05-22 19:03:13 -07:00 committed by Mrunal Patel
parent ddb54bf614
commit 46f6248e42
1 changed files with 5 additions and 0 deletions

View File

@ -668,6 +668,11 @@ int main(int argc, char *argv[])
num_stdio_fds++;
}
/* Add the OOM event fd to epoll */
ev.data.fd = efd;
if (epoll_ctl(epfd, EPOLL_CTL_ADD, ev.data.fd, &ev) < 0)
pexit("Failed to add OOM eventfd to epoll");
/* Log all of the container's output. */
while (num_stdio_fds > 0) {
int ready = epoll_wait(epfd, evlist, MAX_EVENTS, -1);