From cd0127e81fbe156e8d5c68cb9ee4af78ec51d0c2 Mon Sep 17 00:00:00 2001 From: Scott Werner Date: Fri, 11 Sep 2026 09:33:19 -0600 Subject: [PATCH] Only kill the Git process group when a command fails The native Git runner SIGKILLed its child's process group after every command, including successful ones. Git spawns credential-cache--daemon into the same group, so each ls-remote or fetch destroyed the cache it had just warmed and every later command re-ran the full helper chain. Kill the group only on timeout, cancellation, or failure, and drop the redundant kill/wait on an already-reaped child. Co-Authored-By: Claude Fable 5.1 --- .../fabro-cli/src/commands/run/remote_workflow.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/apps/fabro-cli/src/commands/run/remote_workflow.rs b/lib/apps/fabro-cli/src/commands/run/remote_workflow.rs index 64d51d907..ccecc9dba 100644 --- a/lib/apps/fabro-cli/src/commands/run/remote_workflow.rs +++ b/lib/apps/fabro-cli/src/commands/run/remote_workflow.rs @@ -125,16 +125,17 @@ impl NativeGit { Ok(stdout) } => result, }; - // Helpers may inherit pipes or survive their Git parent. Terminate the - // owned process group on both completion and interruption, then reap Git. - #[cfg(unix)] - if let Some(id) = process_id { - fabro_proc::sigkill_process_group(id); - } + // A timed-out, cancelled, or failed Git may leave helpers running in + // its process group; terminate the group, then reap Git. A successful + // Git has closed its pipes, and helpers it deliberately left behind + // (such as `credential-cache--daemon`) keep serving later commands. if result.is_err() { + #[cfg(unix)] + if let Some(id) = process_id { + fabro_proc::sigkill_process_group(id); + } child.kill().await?; } - child.wait().await?; result }