1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

clippy: spawned process is never 'wait()'ed on

This commit is contained in:
Sylvestre Ledru 2024-11-28 21:27:49 +01:00
parent 41a3695b3f
commit a3a4457a44
2 changed files with 9 additions and 6 deletions

View file

@ -36,13 +36,14 @@ impl Target {
Self { child }
}
fn send_signal(&mut self, signal: Signal) {
Command::new("kill")
let _ = Command::new("kill")
.args(&[
format!("-{}", signal as i32),
format!("{}", self.child.id()),
])
.spawn()
.expect("failed to send signal");
.expect("failed to send signal")
.wait();
self.child.delay(100);
}
fn is_alive(&mut self) -> bool {