pub fn wait_for_child( child: Child, cmd_str: String, ) -> Result<(), RunCommandError>
Wait for a child process to exit.
Returns an error if waiting fails, or if the exit code is non-zero.