File indexing completed on 2025-07-05 08:47:18
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PROCESS_V2_PID_HPP
0007 #define BOOST_PROCESS_V2_PID_HPP
0008
0009 #include <boost/process/v2/detail/config.hpp>
0010 #include <boost/process/v2/detail/throw_error.hpp>
0011
0012 #include <vector>
0013
0014 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0015
0016 #if defined(GENERATING_DOCUMENTATION)
0017
0018
0019 typedef implementation_defined pid_type;
0020
0021 #else
0022
0023 #if defined(BOOST_PROCESS_V2_WINDOWS)
0024
0025 typedef unsigned long pid_type;
0026
0027 #else
0028
0029 typedef int pid_type;
0030
0031 #endif
0032 #endif
0033
0034 #if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__sun))
0035 constexpr static pid_type root_pid = 0;
0036 #elif (defined(__APPLE__) && defined(__MACH__) || defined(__linux__) || defined(__ANDROID__) || defined(__OpenBSD__))
0037 constexpr static pid_type root_pid = 1;
0038 #endif
0039
0040
0041 BOOST_PROCESS_V2_DECL pid_type current_pid();
0042
0043
0044 BOOST_PROCESS_V2_DECL std::vector<pid_type> all_pids(boost::system::error_code & ec);
0045
0046
0047 BOOST_PROCESS_V2_DECL std::vector<pid_type> all_pids();
0048
0049
0050 BOOST_PROCESS_V2_DECL pid_type parent_pid(pid_type pid, boost::system::error_code & ec);
0051
0052
0053 BOOST_PROCESS_V2_DECL pid_type parent_pid(pid_type pid);
0054
0055
0056 BOOST_PROCESS_V2_DECL std::vector<pid_type> child_pids(pid_type pid, boost::system::error_code & ec);
0057
0058
0059 BOOST_PROCESS_V2_DECL std::vector<pid_type> child_pids(pid_type pid);
0060
0061 BOOST_PROCESS_V2_END_NAMESPACE
0062
0063
0064 #endif
0065