Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:02:56

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_CMD_HPP
0007 #define BOOST_PROCESS_V2_CMD_HPP
0008 
0009 #include <string>
0010 #include <vector>
0011 #include <memory>
0012 
0013 #include <boost/process/v2/detail/config.hpp>
0014 #include <boost/process/v2/detail/throw_error.hpp>
0015 #include <boost/process/v2/process_handle.hpp>
0016 #include <boost/process/v2/pid.hpp>
0017 
0018 #include <boost/process/v2/shell.hpp>
0019 
0020 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0021 
0022 namespace ext {
0023 
0024 #if defined(BOOST_PROCESS_V2_WINDOWS)
0025 BOOST_PROCESS_V2_DECL shell cmd(HANDLE handle, error_code & ec);
0026 BOOST_PROCESS_V2_DECL shell cmd(HANDLE handle);
0027 #endif
0028 
0029 /// @{
0030 /// Get the argument vector of another process
0031 BOOST_PROCESS_V2_DECL shell cmd(pid_type pid, error_code & ec);
0032 BOOST_PROCESS_V2_DECL shell cmd(pid_type pid);
0033 
0034 #if defined(BOOST_PROCESS_V2_WINDOWS)
0035 BOOST_PROCESS_V2_DECL shell cmd(HANDLE handle, error_code & ec);
0036 BOOST_PROCESS_V2_DECL shell cmd(HANDLE handle);
0037 #endif
0038 
0039 template<typename Executor>
0040 inline shell cmd(basic_process_handle<Executor> & handle, error_code & ec)
0041 {
0042 #if defined(BOOST_PROCESS_V2_WINDOWS)
0043     return cmd(handle.native_handle(), ec);
0044 #else
0045     return cmd(handle.id(), ec);
0046 #endif
0047 }
0048 
0049 template<typename Executor>
0050 inline shell cmd(basic_process_handle<Executor> & handle)
0051 {
0052 #if defined(BOOST_PROCESS_V2_WINDOWS)
0053     return cmd(handle.native_handle());
0054 #else
0055     return cmd(handle.id());
0056 #endif
0057 }
0058 
0059 /// @}
0060 
0061 } // namespace ext
0062 
0063 BOOST_PROCESS_V2_END_NAMESPACE
0064 
0065 
0066 #endif // BOOST_PROCESS_V2_CMD_HPP