Skip to content
Merged
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
10 changes: 5 additions & 5 deletions rust/src/host/command_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl CommandRunner {
match child.try_wait() {
Ok(Some(status)) => return status.code(),
Ok(None) => {}
Err(_) => return None,
Err(_) => break,
}
if remaining.is_zero() {
break;
Expand All @@ -281,10 +281,10 @@ impl CommandRunner {
std::thread::sleep(step);
remaining -= step;
}
// Teardown after timeout/capture. If the process exited between the
// grace loop and kill (kill fails on an already-dead process), `wait`
// still yields the true exit status; when the kill lands, the code is
// ours and already reported separately.
// Teardown after timeout/capture or a transient try_wait error
// (e.g. ECHILD/handle race). If the process already exited, kill
// fails and `wait` still yields the true exit status; when the kill
// lands, the code is ours and already reported separately.
let killed = child.kill().is_ok();
let reaped = child.wait().ok();
if killed {
Expand Down
Loading