2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00

Switched #error to ENOTSUP for ext libs. Should help #413

Closes #358.
This commit is contained in:
Klemens Morgenstern
2024-10-25 08:13:48 +08:00
parent 9f104634a9
commit 46b71d5e96
4 changed files with 30 additions and 4 deletions

View File

@@ -394,7 +394,11 @@ shell cmd(boost::process::v2::pid_type pid, boost::system::error_code & ec)
}
#else
#error "Platform not supported"
filesystem::path cmd(boost::process::v2::pid_type, boost::system::error_code & ec)
{
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, boost::system::system_category())
return "";
}
#endif
shell cmd(boost::process::v2::pid_type pid)

View File

@@ -197,7 +197,11 @@ filesystem::path cwd(boost::process::v2::pid_type pid, boost::system::error_code
}
#else
#error "Platform not supported"
filesystem::path cwd(boost::process::v2::pid_type pid, boost::system::error_code & ec)
{
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, boost::system::system_category())
return "";
}
#endif
filesystem::path cwd(boost::process::v2::pid_type pid)

View File

@@ -175,7 +175,11 @@ filesystem::path exe(boost::process::v2::pid_type pid, boost::system::error_code
}
#else
#error "Platform not supported"
filesystem::path exe(boost::process::v2::pid_type pid, boost::system::error_code & ec)
{
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, boost::system::system_category())
return "";
}
#endif
filesystem::path exe(boost::process::v2::pid_type pid)

View File

@@ -727,7 +727,21 @@ std::vector<pid_type> child_pids(pid_type pid, boost::system::error_code & ec)
}
#else
#error "Platform not supported"
std::vector<pid_type> all_pids(boost::system::error_code & ec)
{
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, system_category());
return {};
}
pid_type parent_pid(pid_type pid, boost::system::error_code & ec)
{
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, system_category());
return pid;
}
std::vector<pid_type> child_pids(pid_type, boost::system::error_code & ec)
{
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, system_category());
return {};
}
#endif
std::vector<pid_type> all_pids()