Boost C++ Libraries: Ticket #12358: epoll_reactor calls fcntl without checking return code https://svn.boost.org/trac10/ticket/12358 <p> From lines 469 to 473 of epoll_reactor.ipp: </p> <pre class="wiki"> if (fd == -1 &amp;&amp; (errno == EINVAL || errno == ENOSYS)) { fd = epoll_create(epoll_size); if (fd != -1) ::fcntl(fd, F_SETFD, FD_CLOEXEC); } </pre><p> This is at least as far back as 1.54 however it is present in the development trunk too. Should this fcntl fail for some reason, what is the correct behavior? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12358 Trac 1.4.3 jim.king@… Fri, 29 Jul 2016 12:22:20 GMT keywords set https://svn.boost.org/trac10/ticket/12358#comment:1 https://svn.boost.org/trac10/ticket/12358#comment:1 <ul> <li><strong>keywords</strong> fcntl epoll asio added </li> </ul> <p> This happens again at lines 496 to 501: </p> <pre class="wiki"> if (fd == -1 &amp;&amp; errno == EINVAL) { fd = timerfd_create(CLOCK_MONOTONIC, 0); if (fd != -1) ::fcntl(fd, F_SETFD, FD_CLOEXEC); } </pre> Ticket