File indexing completed on 2025-09-18 09:02:58
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 #include <memory>
0014
0015 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0016
0017 #if defined(GENERATING_DOCUMENTATION)
0018
0019
0020 typedef implementation_defined pid_type;
0021
0022 #else
0023
0024 #if defined(BOOST_PROCESS_V2_WINDOWS)
0025
0026 typedef unsigned long pid_type;
0027
0028 #else
0029
0030 typedef int pid_type;
0031
0032 #endif
0033 #endif
0034
0035 #if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__sun))
0036 constexpr static pid_type root_pid = 0;
0037 #elif (defined(__APPLE__) && defined(__MACH__) || defined(__linux__) || defined(__ANDROID__) || defined(__OpenBSD__))
0038 constexpr static pid_type root_pid = 1;
0039 #endif
0040
0041
0042 BOOST_PROCESS_V2_DECL pid_type current_pid();
0043
0044
0045 BOOST_PROCESS_V2_DECL std::vector<pid_type> all_pids(error_code & ec);
0046
0047
0048 BOOST_PROCESS_V2_DECL std::vector<pid_type> all_pids();
0049
0050
0051 BOOST_PROCESS_V2_DECL pid_type parent_pid(pid_type pid, error_code & ec);
0052
0053
0054 BOOST_PROCESS_V2_DECL pid_type parent_pid(pid_type pid);
0055
0056
0057 BOOST_PROCESS_V2_DECL std::vector<pid_type> child_pids(pid_type pid, error_code & ec);
0058
0059
0060 BOOST_PROCESS_V2_DECL std::vector<pid_type> child_pids(pid_type pid);
0061
0062 BOOST_PROCESS_V2_END_NAMESPACE
0063
0064
0065 #endif
0066