Subject: [Boost-bugs] [Boost C++ Libraries] #4971: stream_descriptor not remove descriptor from epoll_reactor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-09 09:33:58
#4971: stream_descriptor not remove descriptor from epoll_reactor
---------------------------------------------+------------------------------
Reporter: APinaev@⦠| Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.45.0 | Severity: Problem
Keywords: epoll_reactor stream_descriptor |
---------------------------------------------+------------------------------
{{{
#include <iostream>
#include <unistd.h>
#include <boost/asio.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
int main() {
boost::asio::io_service io_srv;
{
int cfd = ::dup(STDOUT_FILENO);
std::cout << "fd=" << cfd << std::endl << std::flush;
boost::asio::posix::stream_descriptor sd(io_srv, cfd);
sd.cancel();
sd.close();
}
{
int cfd = ::dup(STDOUT_FILENO);
std::cout << "fd=" << cfd << std::endl << std::flush;
boost::asio::posix::stream_descriptor sd(io_srv, cfd);
sd.cancel();
sd.close();
}
}
}}}
this code nice work on Fedora Core 5 / boost-1.44.0 (used select_reactor),
but on Fedora 14 (epoll_reactor) boost- 1.44.0, 1.45.0 and TRUNK failed:
{{{
$ ./a.out
fd=3
fd=3
terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error>
>'
what(): File exists
... (core dumped)
}}}
error thrown from constructor stream_descriptor, when boost try add
descriptor inside epoll_reactor by calling epoll_ctl and receive error
EEXIST
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4971> 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:05 UTC