fixup! std: Child::kill() returns error if process has already exited
This commit is contained in:
parent
7eb9a091f3
commit
d541282d6c
1 changed files with 4 additions and 1 deletions
|
@ -1121,7 +1121,8 @@ impl ExitCode {
|
|||
}
|
||||
|
||||
impl Child {
|
||||
/// Forces the child process to exit. If the child has already exited, an error is returned.
|
||||
/// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
|
||||
/// error might be returned.
|
||||
///
|
||||
/// This is equivalent to sending a SIGKILL on Unix platforms.
|
||||
///
|
||||
|
@ -1139,6 +1140,8 @@ impl Child {
|
|||
/// println!("yes command didn't start");
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
|
||||
#[stable(feature = "process", since = "1.0.0")]
|
||||
pub fn kill(&mut self) -> io::Result<()> {
|
||||
self.handle.kill()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue