Spawn and Wait for a Child


The following echo_wait program demonstrates how to start a child process with Command::spawn(), which returns immediately so that the parent keeps running, and then wait for the child to finish with Child::wait(). It also shows how to tell a normal exit apart from termination by a signal.

This zip file contains the complete crate.

src/main.rs