MCPcopy Create free account
hub / github.com/elastio/devx / drop

Method drop

devx-cmd/src/lib.rs:502–515  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

500
501impl Drop for Child {
502 fn drop(&mut self) {
503 match self.child.try_wait() {
504 Ok(None) => {
505 log::debug!("[KILL {}] {}", self.child.id(), self.cmd.bin_name());
506 let _ = self.child.kill();
507 self.child.wait().unwrap_or_else(|err| {
508 panic!("Failed to wait for process: {}\nProcess: {}", err, self);
509 });
510 }
511 // Already exited, no need for murder
512 Ok(Some(_status)) => {}
513 Err(err) => panic!("Failed to collect process exit status: {}", err),
514 }
515 }
516}
517
518impl fmt::Display for Child {

Callers

nothing calls this directly

Calls 1

waitMethod · 0.80

Tested by

no test coverage detected