Subject: [Boost-bugs] [Boost C++ Libraries] #7530: do_epoll_create : errno is manually set to EINVAL, causes problems downstream
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-18 17:15:57
#7530: do_epoll_create : errno is manually set to EINVAL, causes problems
downstream
-------------------------------------+--------------------------------------
Reporter: launchpadmike@⦠| Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.51.0 | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
Affected code:
#if defined(EPOLL_CLOEXEC)
int fd = epoll_create1(EPOLL_CLOEXEC);
#else // defined(EPOLL_CLOEXEC)
int fd = -1;
errno = EINVAL;
#endif // defined(EPOLL_CLOEXEC)
errno is never reset back to 0 (system calls will NOT set it to 0 if
successful), causing problems with error checking further downstream in
user code. Suggest using a bool or something instead to indicate that
epoll_create1 is not present.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7530> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC