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