|
Boost-Commit : |
From: chris_at_[hidden]
Date: 2007-10-17 03:25:03
Author: chris_kohlhoff
Date: 2007-10-17 03:25:03 EDT (Wed, 17 Oct 2007)
New Revision: 40107
URL: http://svn.boost.org/trac/boost/changeset/40107
Log:
Throw an exception if unable to create a pipe for the pipe_select_interrupter.
Text files modified:
trunk/boost/asio/detail/pipe_select_interrupter.hpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
Modified: trunk/boost/asio/detail/pipe_select_interrupter.hpp
==============================================================================
--- trunk/boost/asio/detail/pipe_select_interrupter.hpp (original)
+++ trunk/boost/asio/detail/pipe_select_interrupter.hpp 2007-10-17 03:25:03 EDT (Wed, 17 Oct 2007)
@@ -19,6 +19,8 @@
#include <boost/asio/detail/push_options.hpp>
#include <boost/config.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/system/system_error.hpp>
#include <boost/asio/detail/pop_options.hpp>
#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
@@ -27,6 +29,7 @@
#include <fcntl.h>
#include <boost/asio/detail/pop_options.hpp>
+#include <boost/asio/error.hpp>
#include <boost/asio/detail/socket_types.hpp>
namespace boost {
@@ -47,6 +50,12 @@
write_descriptor_ = pipe_fds[1];
::fcntl(write_descriptor_, F_SETFL, O_NONBLOCK);
}
+ else
+ {
+ boost::system::error_code ec(errno, boost::asio::error::system_category);
+ boost::system::system_error e(ec, "pipe_select_interrupter");
+ boost::throw_exception(e);
+ }
}
// Destructor.
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk