v.cmdexec #
read_process_pipe reads without waiting and distinguishes EOF from an empty pipe that still has writers. Process.stdout_read alone conflates those cases.
Constants #
const no_timeout = i64(0)
no_timeout waits for the child process for as long as it takes.
fn display #
fn display(program string, args []string) string
display returns a shell-escaped representation for logging only.
fn macos_sdk_root #
fn macos_sdk_root() string
macos_sdk_root finds and caches the SDK selected by Apple's command-line tools.
fn run #
fn run(program string, args []string) os.Result
run executes program with an exact argument vector and captures its output. Both output pipes are drained until EOF, including writers inherited by descendants. Standard input is empty (the null device); the caller's input is not inherited.
fn run_in #
fn run_in(program string, args []string, work_folder string) os.Result
run_in executes program in work_folder with an exact argument vector and empty stdin.
fn run_in_merged #
fn run_in_merged(program string, args []string, work_folder string) os.Result
run_in_merged executes a command with an exact argument vector and captures both stdout and stderr. Standard input is empty, as with run.
fn run_with_timeout #
fn run_with_timeout(program string, args []string, timeout_ms i64) os.Result
run_with_timeout is run, bounded: after timeout_ms milliseconds the child is killed and a non zero result is returned. Use it for short probes that must never be able to block a build, so that a child which can never make progress is reported instead of hanging the compiler forever. The deadline also covers output pipes inherited by descendants after the direct child has exited.
fn split_args #
fn split_args(input string) ![]string
split_args parses a directive or tool response into literal argv elements. Quotes and quoting backslash escapes group text; no shell expansion is performed.