Skip to main content

spawn_one

Function spawn_one 

Source
pub fn spawn_one(cmd: &str) -> Result<Child>
Expand description

Spawn one command via the platform shell with stdin piped. On Unix: /bin/sh -c '<cmd>'. On Windows: cmd /C "<cmd>".

Stdout and stderr are inherited from the parent (Stdio::inherit()) so children write to the parent’s terminal — outputs interleave nondeterministically (matches moreutils default).