14 #include <boost/system/error_code.hpp>
27 template <
class PosixExecutor>
30 if (::
pipe(fds_) == -1)
32 BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec_);
34 if (::fcntl(fds_[1], F_SETFD, FD_CLOEXEC) == -1)
36 BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec_);
42 template <
class PosixExecutor>
47 BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec_);
53 template <
class PosixExecutor>
60 if (::
read(fds_[0], &code,
sizeof(
int)) > 0)
62 ec_ = boost::system::error_code(code,
63 boost::system::system_category());
69 template <
class PosixExecutor>
78 template <
class PosixExecutor>
84 while (::
write(fds_[1], &e,
sizeof(
int)) == -1 && errno == EINTR)
91 boost::system::error_code& ec_;