feat(platform,daemon): isolate executable lookup and report host backends
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 8s

This commit is contained in:
faumaray committed 2026-12-04 04:15:42 +03:00
1 parent 105519924a
commit 9f4477b8d4
10 files changed
+93 -7

No files matched your search

+13
View File
@@ -315,4 +315,17 @@ resolve_confined_path(const std::filesystem::path &root, const std::filesystem::
EACCES)};
}
Void::Result::Result<std::filesystem::path, Void::Result::Error> current_executable_path() {
std::error_code ec;
const auto path = std::filesystem::read_symlink("/proc/self/exe", ec);
if (ec || path.empty()) {
return std::unexpected{Void::System::make_system_error(
Void::System::SystemErrorCode::io_error,
std::format("current_executable_path: cannot resolve /proc/self/exe: {}",
ec ? ec.message() : "empty path"),
ec.value())};
}
return path;
}
} // namespace Void::Build::Platform