std.process Module Reference
The std.process module provides primitives for spawning child processes and executing system commands.
process_example.sp
1import std.io;2import std.process;34fn main() -> void {5 let exitCode = process.exec("git --version");6 println("Git check exit code: ${exitCode}");7}
Exported Functions
process.exec
Native Builtinfn process.exec(string command) -> int
Spawns a shell command synchronously and returns the exit status code.
Parameters
command(string)
Command string to execute.Returns:
int (0 if process succeeded)