mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 14:33:37 -08:00
fix: Coverage reporting in API integration tests
This commit is contained in:
@@ -22,8 +22,17 @@ struct KillChild(std::process::Child);
|
|||||||
|
|
||||||
impl Drop for KillChild {
|
impl Drop for KillChild {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.0.kill().discard_result();
|
use rustix::process::{kill_process, Pid, Signal::Term};
|
||||||
self.0.wait().discard_result()
|
let pid = Pid::from_child(&self.0);
|
||||||
|
// We seriously need to start handling signals with signalfd, our current signal handling
|
||||||
|
// system is a bit broken; there is probably a few functions that just restart on EINTR
|
||||||
|
// so the signal is absorbed
|
||||||
|
loop {
|
||||||
|
kill_process(pid, Term).discard_result();
|
||||||
|
if self.0.try_wait().unwrap().is_some() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user