fixup! std: Child::kill() returns error if process has already exited
This commit is contained in:
parent
d541282d6c
commit
51dc6304e7
1 changed files with 6 additions and 1 deletions
|
@ -1122,7 +1122,10 @@ impl ExitCode {
|
||||||
|
|
||||||
impl Child {
|
impl Child {
|
||||||
/// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
|
/// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
|
||||||
/// error might be returned.
|
/// error is returned.
|
||||||
|
///
|
||||||
|
/// The mapping to [`ErrorKind`]s is not part of the compatibility contract of the function,
|
||||||
|
/// especially the [`Other`] kind might change to more specific kinds in the future.
|
||||||
///
|
///
|
||||||
/// This is equivalent to sending a SIGKILL on Unix platforms.
|
/// This is equivalent to sending a SIGKILL on Unix platforms.
|
||||||
///
|
///
|
||||||
|
@ -1141,7 +1144,9 @@ impl Child {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
/// [`ErrorKind`]: ../io/enum.ErrorKind.html
|
||||||
/// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
|
/// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
|
||||||
|
/// [`Other]: ../io/enum.ErrorKind.html#variant.Other
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
pub fn kill(&mut self) -> io::Result<()> {
|
pub fn kill(&mut self) -> io::Result<()> {
|
||||||
self.handle.kill()
|
self.handle.kill()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue