From cb9b701d9e57813c63d383208367a201fe30f3ad Mon Sep 17 00:00:00 2001 From: Finesssee <90105158+Finesssee@users.noreply.github.com> Date: Sat, 29 Aug 2026 16:01:09 +0700 Subject: [PATCH] Fix finish_child Err arm to fall through to teardown --- rust/src/host/command_runner.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/src/host/command_runner.rs b/rust/src/host/command_runner.rs index c27775f6b9..627bbb4ede 100755 --- a/rust/src/host/command_runner.rs +++ b/rust/src/host/command_runner.rs @@ -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; @@ -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 {