mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +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 {
|
if self.reaped {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} 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