util::ExecVp

Cross-platform wrapper for POSIX execvp function. Arguments and return value are the same as for POSIX execvp, and the argv array should consist of null terminated strings and be null terminated itself, like the POSIX function.

Synopsis

Declared in <util/exec.h>

int
ExecVp(
    char const* file,
    char const* argv[]);

Return Value

The execvp return value; only returns on failure.

Parameters

NameDescription
fileThe file to execute, resolved via PATH as in execvp.
argvThe null-terminated argument array passed to the program.