Skip to content

Commit 26c782b

Browse files
committed
ExitStatusError: Remove mentions in stable docs
We should revert this commit when this is stabilised. Signed-off-by: Ian Jackson <[email protected]>
1 parent 4687153 commit 26c782b

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

library/std/src/os/unix/process.rs

+3-27
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ impl CommandExt for process::Command {
198198
/// Unix-specific extensions to [`process::ExitStatus`] and
199199
/// [`ExitStatusError`](process::ExitStatusError).
200200
///
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
202202
/// 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
205205
/// calls.
206206
///
207207
/// A Unix wait status (a Rust `ExitStatus`) can represent a Unix exit status, but can also
@@ -227,30 +227,6 @@ pub trait ExitStatusExt: Sealed {
227227
/// If the process was terminated by a signal, returns that signal.
228228
///
229229
/// 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-
/// ```
254230
#[stable(feature = "rust1", since = "1.0.0")]
255231
fn signal(&self) -> Option<i32>;
256232

0 commit comments

Comments
 (0)