diff --git a/include/boost/process/detail/posix/pipe_out.hpp b/include/boost/process/detail/posix/pipe_out.hpp index d54cca4ef..19790318d 100644 --- a/include/boost/process/detail/posix/pipe_out.hpp +++ b/include/boost/process/detail/posix/pipe_out.hpp @@ -14,15 +14,25 @@ #include #include #include +#include +#include namespace boost { namespace process { namespace detail { namespace posix { template -struct pipe_out : handler_base_ext +struct pipe_out : handler_base_ext, ::boost::process::detail::uses_handles { int sink; int source; //opposite end + std::array get_used_handles() + { + const auto pp1 = p1 != -1 ? p1 : p2; + const auto pp2 = p2 != -1 ? p2 : p1; + + return {source, sink, pp1, pp2}; + } + pipe_out(int sink, int source) : sink(sink), source(source) {} template