cuda-doctor logo

Process abstraction

Implementedv0.0.0

include/core/process.hpp

This header defines a minimal process helper surface: find a command, test whether it exists, run a shell command and capture exit/output, or capture output directly.

Reference

Public APIcpp
struct CommandResult { int exit_code; std::string output; };
bool command_exists(const std::string& name);
std::optional<std::filesystem::path> find_command(const std::string& name);
CommandResult run(const std::string& command);
std::string capture(const char* command);

Usage

The probing files stay narrow because they rely on this interface instead of open-coding PATH scans and `popen` behavior themselves. It is a tiny portability layer for shell-based detection.