12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef BOOST_PROCESS_V2_EXE_HPP
- #define BOOST_PROCESS_V2_EXE_HPP
- #include <boost/process/v2/detail/config.hpp>
- #include <boost/process/v2/detail/throw_error.hpp>
- #include <boost/process/v2/process_handle.hpp>
- #include <boost/process/v2/pid.hpp>
- BOOST_PROCESS_V2_BEGIN_NAMESPACE
- namespace ext {
- #if defined(BOOST_PROCESS_V2_WINDOWS)
- BOOST_PROCESS_V2_DECL filesystem::path exe(HANDLE handle, error_code & ec);
- BOOST_PROCESS_V2_DECL filesystem::path exe(HANDLE handle);
- #endif
- BOOST_PROCESS_V2_DECL filesystem::path exe(pid_type pid, error_code & ec);
- BOOST_PROCESS_V2_DECL filesystem::path exe(pid_type pid);
- template<typename Executor>
- filesystem::path exe(basic_process_handle<Executor> & handle, error_code & ec)
- {
- #if defined(BOOST_PROCESS_V2_WINDOWS)
- return exe(handle.native_handle(), ec);
- #else
- return exe(handle.id(), ec);
- #endif
- }
- template<typename Executor>
- filesystem::path exe(basic_process_handle<Executor> & handle)
- {
- #if defined(BOOST_PROCESS_V2_WINDOWS)
- return exe(handle.native_handle());
- #else
- return exe(handle.id());
- #endif
- }
- }
- BOOST_PROCESS_V2_END_NAMESPACE
- #endif
|