2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00
This commit is contained in:
Klemens
2022-06-11 15:00:32 +08:00
parent c1fb7758b2
commit 1a1d677d76
2 changed files with 9 additions and 1 deletions

View File

@@ -151,6 +151,7 @@ class executor
int _pipe_sink = -1;
void write_error(const std::error_code & ec, const char * msg)
{
//I am the child
@@ -327,6 +328,13 @@ public:
}
void set_error(const std::error_code &ec, const std::string &msg) {set_error(ec, msg.c_str());};
std::vector<int> get_used_handles() const
{
if (_pipe_sink == -1)
return {};
else
return {_pipe_sink};
};
};
template<typename Sequence>

View File

@@ -69,7 +69,7 @@ template<typename Executor>
std::vector<::boost::process::detail::api::native_handle_type>
get_used_handles(Executor &exec)
{
std::vector<::boost::process::detail::api::native_handle_type> res;
std::vector<::boost::process::detail::api::native_handle_type> res = exec.get_used_handles();
foreach_used_handle(exec, [&](::boost::process::detail::api::native_handle_type handle){res.push_back(handle);});
return res;
}