mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
process: calling start_kill on exited child should not fail (#7160)
This commit is contained in:
@@ -1158,10 +1158,7 @@ impl Child {
|
|||||||
pub fn start_kill(&mut self) -> io::Result<()> {
|
pub fn start_kill(&mut self) -> io::Result<()> {
|
||||||
match &mut self.child {
|
match &mut self.child {
|
||||||
FusedChild::Child(child) => child.kill(),
|
FusedChild::Child(child) => child.kill(),
|
||||||
FusedChild::Done(_) => Err(io::Error::new(
|
FusedChild::Done(_) => Ok(()),
|
||||||
io::ErrorKind::InvalidInput,
|
|
||||||
"invalid argument: can't kill an exited process",
|
|
||||||
)),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user