Merge pull request #23236 from tpetkov-VMW/fix-grpc_is_epollexclusive_available

Fix false positive in grpc_is_epollexclusive_available on ESXi
pull/23537/head
Mark D. Roth 5 years ago committed by GitHub
commit f02fb563cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/core/lib/iomgr/is_epollexclusive_available.cc

@ -93,6 +93,20 @@ bool grpc_is_epollexclusive_available(void) {
close(evfd);
return false;
}
// Check that EPOLLEXCLUSIVE is supported at all.
ev.events = static_cast<uint32_t>(EPOLLET | EPOLLIN | EPOLLEXCLUSIVE);
if (epoll_ctl(fd, EPOLL_CTL_ADD, evfd, &ev) != 0) {
if (!logged_why_not) {
gpr_log(GPR_DEBUG,
"epoll_ctl with EPOLLEXCLUSIVE failed with error: "
"%d. Not using epollex polling engine.",
errno);
logged_why_not = true;
}
close(fd);
close(evfd);
return false;
}
close(evfd);
close(fd);
return true;

Loading…
Cancel
Save