2
0
mirror of https://github.com/boostorg/process.git synced 2026-02-22 03:32:19 +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 817128108a
commit 8a8ca8b7ab
6 changed files with 92 additions and 10 deletions

View File

@@ -187,7 +187,7 @@ filesystem::path cwd(boost::process::v2::pid_type pid, boost::system::error_code
{
std::vector<char> vecbuff;
vecbuff.resize(len);
if (sysctl(mib, 4, &vecbuff[0], &len, nullptr, 0) == 0)
if (sysctl(mib, sz, &vecbuff[0], &len, nullptr, 0) == 0)
{
path = filesystem::canonical(&vecbuff[0], ec);
}