Skip to content

Commit 51dc630

Browse files
committed
fixup! std: Child::kill() returns error if process has already exited
1 parent d541282 commit 51dc630

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libstd/process.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,10 @@ impl ExitCode {
11221122

11231123
impl Child {
11241124
/// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
1125-
/// error might be returned.
1125+
/// error is returned.
1126+
///
1127+
/// The mapping to [`ErrorKind`]s is not part of the compatibility contract of the function,
1128+
/// especially the [`Other`] kind might change to more specific kinds in the future.
11261129
///
11271130
/// This is equivalent to sending a SIGKILL on Unix platforms.
11281131
///
@@ -1141,7 +1144,9 @@ impl Child {
11411144
/// }
11421145
/// ```
11431146
///
1147+
/// [`ErrorKind`]: ../io/enum.ErrorKind.html
11441148
/// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
1149+
/// [`Other]: ../io/enum.ErrorKind.html#variant.Other
11451150
#[stable(feature = "process", since = "1.0.0")]
11461151
pub fn kill(&mut self) -> io::Result<()> {
11471152
self.handle.kill()

0 commit comments

Comments
 (0)