Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/command/end2end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,20 @@ async fn try_run(cmd: &str, dir: &Utf8Path) -> Result<()> {
let mut int = Interrupt::subscribe_any();

tokio::select! {
_ = int.recv() => Ok(()),
_ = int.recv() => {
match process.try_wait() {
Ok(None) | Err(_) => {
trace!("End2End child process still alive; attempting to kill...");
match process.kill().await {
Err(e) => warn!("Could not kill End2End child process: {}", e),
Ok(_) => trace!("Successfully killed End2End child process"),
}
}
Ok(Some(status)) => trace!("End2End child process already exited with {status}"),
}

Ok(())
},
result = process.wait() => {
let status = result?;
if !status.success() {
Expand Down