mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-16 00:00:12 +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<()> {
|
||||
match &mut self.child {
|
||||
FusedChild::Child(child) => child.kill(),
|
||||
FusedChild::Done(_) => Err(io::Error::new(
|
||||
io::ErrorKind::InvalidInput,
|
||||
"invalid argument: can't kill an exited process",
|
||||
)),
|
||||
FusedChild::Done(_) => Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user