From 22e2bc73c8c6c66b079c0369781dea7b0a5c931e Mon Sep 17 00:00:00 2001 From: ProofOfConcept Date: Thu, 5 Mar 2026 22:58:40 -0500 Subject: [PATCH] =?UTF-8?q?llm:=20fix=20duration=20timer=20=E2=80=94=20sta?= =?UTF-8?q?rt=20before=20subprocess,=20not=20after?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/llm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llm.rs b/src/llm.rs index 34a0994..3754533 100644 --- a/src/llm.rs +++ b/src/llm.rs @@ -59,6 +59,8 @@ fn call_model(agent: &str, model: &str, prompt: &str) -> Result cmd.env("CLAUDE_CONFIG_DIR", dir); } + let start = std::time::Instant::now(); + let result = unsafe { cmd.pre_exec(|| { libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM); @@ -67,8 +69,6 @@ fn call_model(agent: &str, model: &str, prompt: &str) -> Result .output() }; - let start = std::time::Instant::now(); - fs::remove_file(&tmp).ok(); match result {