Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,21 @@ impl PtyProcess {
///
/// This method runs waitpid on the process.
/// This means: If you ran `exit()` before or `status()` this method will
/// return an Error
/// return `None`
///
/// # Example
/// ```rust,no_run
///
/// # extern crate rexpect;
/// use rexpect::process;
/// use rexpect::process::{self, wait::WaitStatus};
/// use std::process::Command;
///
/// # fn main() {
/// let cmd = Command::new("/path/to/myprog");
/// let process = process::PtyProcess::new(cmd).expect("could not execute myprog");
/// while process.status().unwrap() == process::wait::WaitStatus::StillAlive {
/// // do something
/// }
/// let cmd = Command::new("/path/to/myprog");
/// let process = process::PtyProcess::new(cmd).expect("could not execute myprog");
/// while let Some(WaitStatus::StillAlive) = process.status() {
/// // do something
/// }
/// # }
/// ```
///
Expand Down