Function rexpect::session::spawn [] [src]

pub fn spawn(program: &str, timeout: Option<u64>) -> Result<PtySession>

Start command in background in a pty session (pty fork) and return a struct with writer and buffered reader (for unblocking reads).

Arguments:

  • program: This is split at spaces and turned into a process::Command if you wish more control over this, use spawn_command