Stdlibprocess
exec
import std::process::exec; · source
Running through the shell
function shell(command: string) -> i32;
shell(command) — also reachable as Command::shell — runs one command line through the platform shell (/bin/sh -c on POSIX, cmd /c on Windows) with inherited stdio, and returns the exit code, or -1 if the shell could not be spawned or the child died to a signal. This is the cross-platform replacement for the raw system(3) intrinsic when a command genuinely needs shell semantics: pipes, redirects, glob expansion. For a plain program invocation, build the argv with Command and call status instead.