Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:10

0001 // Copyright (c) 2022 Klemens D. Morgenstern
0002 // Copyright (c) 2022 Samuel Venable
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 #ifndef BOOST_PROCESS_V2_EXE_HPP
0007 #define BOOST_PROCESS_V2_EXE_HPP
0008 
0009 #include <boost/process/v2/detail/config.hpp>
0010 #include <boost/process/v2/detail/throw_error.hpp>
0011 
0012 #include <boost/process/v2/process_handle.hpp>
0013 #include <boost/process/v2/pid.hpp>
0014 
0015 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0016 
0017 namespace ext {
0018 
0019 #if defined(BOOST_PROCESS_V2_WINDOWS)
0020 BOOST_PROCESS_V2_DECL filesystem::path exe(HANDLE handle, error_code & ec);
0021 BOOST_PROCESS_V2_DECL filesystem::path exe(HANDLE handle);
0022 #endif
0023 
0024 /// @{
0025 /// Return the executable of another process by pid or handle.
0026 BOOST_PROCESS_V2_DECL filesystem::path exe(pid_type pid, error_code & ec);
0027 BOOST_PROCESS_V2_DECL filesystem::path exe(pid_type pid);
0028 
0029 
0030 
0031 template<typename Executor>
0032 filesystem::path exe(basic_process_handle<Executor> & handle, error_code & ec)
0033 {
0034 #if defined(BOOST_PROCESS_V2_WINDOWS)
0035     return exe(handle.native_handle(), ec);
0036 #else
0037     return exe(handle.id(), ec);
0038 #endif
0039 }
0040 
0041 template<typename Executor>
0042 filesystem::path exe(basic_process_handle<Executor> & handle)
0043 {
0044 #if defined(BOOST_PROCESS_V2_WINDOWS)
0045     return exe(handle.native_handle());
0046 #else
0047     return exe(handle.id());
0048 #endif
0049 }
0050 
0051 ///@}
0052 
0053 } // namespace ext
0054 
0055 BOOST_PROCESS_V2_END_NAMESPACE
0056 
0057 #if defined(BOOST_PROCESS_V2_HEADER_ONLY)
0058 #include <boost/process/v2/ext/impl/exe.ipp>
0059 #endif
0060 
0061 #endif // BOOST_PROCESS_V2_EXE_HPP
0062