std::process
doc improvements.
* Link to `process::Command` from `process::Child`. * Move out inline Markdown link in doc comment. * Link to `process::Child::wait` from `process::Child`. * Link to `process::Child` from `process::ChildStdin`. * Link to `process::Child` from `process::ChildStdout`. * Link to `process::Child` from `process::ChildStderr`.
This commit is contained in:
parent
46e7f4b8c5
commit
97d96bd40c
1 changed files with 29 additions and 11 deletions
|
@ -27,8 +27,9 @@ use sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
|
||||||
/// Representation of a running or exited child process.
|
/// Representation of a running or exited child process.
|
||||||
///
|
///
|
||||||
/// This structure is used to represent and manage child processes. A child
|
/// This structure is used to represent and manage child processes. A child
|
||||||
/// process is created via the `Command` struct, which configures the spawning
|
/// process is created via the [`Command`] struct, which configures the
|
||||||
/// process and can itself be constructed using a builder-style interface.
|
/// spawning process and can itself be constructed using a builder-style
|
||||||
|
/// interface.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -48,13 +49,18 @@ use sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
|
||||||
///
|
///
|
||||||
/// # Note
|
/// # Note
|
||||||
///
|
///
|
||||||
/// Take note that there is no implementation of
|
/// Take note that there is no implementation of [`Drop`] for child processes,
|
||||||
/// [`Drop`](../../core/ops/trait.Drop.html) for child processes, so if you
|
/// so if you do not ensure the `Child` has exited then it will continue to
|
||||||
/// do not ensure the `Child` has exited then it will continue to run, even
|
/// run, even after the `Child` handle to the child process has gone out of
|
||||||
/// after the `Child` handle to the child process has gone out of scope.
|
/// scope.
|
||||||
///
|
///
|
||||||
/// Calling `wait` (or other functions that wrap around it) will make the
|
/// Calling [`wait`][`wait`] (or other functions that wrap around it) will make
|
||||||
/// parent process wait until the child has actually exited before continuing.
|
/// the parent process wait until the child has actually exited before
|
||||||
|
/// continuing.
|
||||||
|
///
|
||||||
|
/// [`Command`]: struct.Command.html
|
||||||
|
/// [`Drop`]: ../../core/ops/trait.Drop.html
|
||||||
|
/// [`wait`]: #method.wait
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
pub struct Child {
|
pub struct Child {
|
||||||
handle: imp::Process,
|
handle: imp::Process,
|
||||||
|
@ -91,7 +97,11 @@ impl IntoInner<imp::Process> for Child {
|
||||||
fn into_inner(self) -> imp::Process { self.handle }
|
fn into_inner(self) -> imp::Process { self.handle }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A handle to a child process's stdin
|
/// A handle to a child process's stdin. This struct is used in the [`stdin`]
|
||||||
|
/// field on [`Child`].
|
||||||
|
///
|
||||||
|
/// [`Child`]: struct.Child.html
|
||||||
|
/// [`stdin`]: struct.Child.html#structfield.stdin
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
pub struct ChildStdin {
|
pub struct ChildStdin {
|
||||||
inner: AnonPipe
|
inner: AnonPipe
|
||||||
|
@ -122,7 +132,11 @@ impl FromInner<AnonPipe> for ChildStdin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A handle to a child process's stdout
|
/// A handle to a child process's stdout. This struct is used in the [`stdout`]
|
||||||
|
/// field on [`Child`].
|
||||||
|
///
|
||||||
|
/// [`Child`]: struct.Child.html
|
||||||
|
/// [`stdout`]: struct.Child.html#structfield.stdout
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
pub struct ChildStdout {
|
pub struct ChildStdout {
|
||||||
inner: AnonPipe
|
inner: AnonPipe
|
||||||
|
@ -152,7 +166,11 @@ impl FromInner<AnonPipe> for ChildStdout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A handle to a child process's stderr
|
/// A handle to a child process's stderr. This struct is used in the [`stderr`]
|
||||||
|
/// field on [`Child`].
|
||||||
|
///
|
||||||
|
/// [`Child`]: struct.Child.html
|
||||||
|
/// [`stderr`]: struct.Child.html#structfield.stderr
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
pub struct ChildStderr {
|
pub struct ChildStderr {
|
||||||
inner: AnonPipe
|
inner: AnonPipe
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue