mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-18 00:00:09 +02:00
process: fix zombification on Drop on unix
This commit is contained in:
+5
-1
@@ -90,7 +90,11 @@ impl Child {
|
||||
if self.reaped {
|
||||
Ok(())
|
||||
} else {
|
||||
self.inner.kill()
|
||||
self.inner.kill()?;
|
||||
let mut status = 0;
|
||||
let id = self.id() as c_int;
|
||||
unsafe { libc::waitpid(id, &mut status, 0) };
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user