process
Note: parts of this file are platform-conditional
(#if).
Process.Result: status, output
Functions: Process.getenv, Process.setenv, Process.run
struct Process.Result
The exit code and standard output of a finished subprocess.
status
int status;output
StringBuf output;Process.getenv
string? Process.getenv(string name)Returns the value of the environment variable, or null if it's not set.
Process.setenv
void Process.setenv(string name, string value)Sets the environment variable, aborting on failure.
Process.run
Process.Result Process.run(string command)Runs the command in a shell, returning its exit code and standard output.
Standard error is inherited, not captured. Status is -1 if the process was killed by a signal.