@@ -198,10 +198,10 @@ impl CommandExt for process::Command {
198
198
/// Unix-specific extensions to [`process::ExitStatus`] and
199
199
/// [`ExitStatusError`](process::ExitStatusError).
200
200
///
201
- /// On Unix, `ExitStatus` and `ExitStatusError` **do not necessarily represent an exit status**, as
201
+ /// On Unix, `ExitStatus` **does not necessarily represent an exit status**, as
202
202
/// passed to the `exit` system call or returned by
203
- /// [`ExitStatus::code()`](crate::process::ExitStatus::code). They represents **any wait status**
204
- /// (or any nonzero wait status, respectively), as returned by one of the `wait` family of system
203
+ /// [`ExitStatus::code()`](crate::process::ExitStatus::code). It represents **any wait status**
204
+ /// as returned by one of the `wait` family of system
205
205
/// calls.
206
206
///
207
207
/// A Unix wait status (a Rust `ExitStatus`) can represent a Unix exit status, but can also
@@ -227,30 +227,6 @@ pub trait ExitStatusExt: Sealed {
227
227
/// If the process was terminated by a signal, returns that signal.
228
228
///
229
229
/// In other words, if `WIFSIGNALED`, this returns `WTERMSIG`.
230
- ///
231
- /// # Examples
232
- /// ```
233
- /// #![feature(exit_status_error)]
234
- /// use std::process::{Command, ExitStatusError};
235
- /// use std::os::unix::process::ExitStatusExt;
236
- ///
237
- /// fn run(script: &str) -> Result<(), ExitStatusError> {
238
- /// Command::new("sh").args(&["-ec",script])
239
- /// .status().expect("failed to fork/exec sh")
240
- /// .exit_ok()
241
- /// .or_else(|bad| {
242
- /// if bad.signal() == Some(13) /*PIPE*/ {
243
- /// Ok(())
244
- /// } else {
245
- /// Err(bad)
246
- /// }
247
- /// })
248
- /// }
249
- ///
250
- /// run("exit").unwrap();
251
- /// run("kill -PIPE $$").unwrap();
252
- /// run("exit 42").unwrap_err();
253
- /// ```
254
230
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
255
231
fn signal ( & self ) -> Option < i32 > ;
256
232
0 commit comments