2
0
mirror of https://github.com/boostorg/process.git synced 2026-02-21 15:22:11 +00:00

OpenBSD fix & Solaris fixes

[DragonFly BSD] Use Proper CWD From PID Code
This commit is contained in:
Samuel Venable
2024-10-27 17:49:44 +08:00
committed by Klemens Morgenstern
parent adf3d62786
commit c8499e02c6
6 changed files with 92 additions and 10 deletions

View File

@@ -19,7 +19,7 @@
#if defined(BOOST_PROCESS_V2_WINDOWS)
#include <windows.h>
#include <shellapi.h>
#else
#elif !defined(__OpenBSD__)
#include <wordexp.h>
#endif
@@ -30,7 +30,7 @@ BOOST_PROCESS_V2_DECL const error_category& get_shell_category()
{
return system_category();
}
#else
#elif !defined(__OpenBSD__)
struct shell_category_t final : public error_category
{
@@ -66,6 +66,13 @@ BOOST_PROCESS_V2_DECL const error_category& get_shell_category()
return instance;
}
#else
const error_category& get_shell_category()
{
return system_category();
}
#endif
#if defined (BOOST_PROCESS_V2_WINDOWS)
@@ -92,7 +99,7 @@ auto shell::args() const-> args_type
return input_.c_str();
}
#else
#elif !defined(__OpenBSD__)
void shell::parse_()
{
@@ -135,6 +142,22 @@ auto shell::args() const -> args_type
return const_cast<const char**>(argv());
}
#else
void shell::parse_()
{
error_code ec;
BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, system_category());
throw system_error(ec, "shell::parse");
}
shell::~shell() = default;
auto shell::args() const -> args_type
{
return nullptr;
}
#endif
BOOST_PROCESS_V2_END_NAMESPACE