From e2e1c9c276881afcda479237c32bbb67b8b7d2f2 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Sun, 22 Mar 2026 19:29:33 +0000 Subject: [PATCH] refactor(shell): use finally block to reap zombie processes on timeoutx --- nanobot/agent/tools/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanobot/agent/tools/shell.py b/nanobot/agent/tools/shell.py index a69182f..bec189a 100644 --- a/nanobot/agent/tools/shell.py +++ b/nanobot/agent/tools/shell.py @@ -116,7 +116,7 @@ class ExecTool(Tool): try: os.waitpid(process.pid, os.WNOHANG) except (ProcessLookupError, ChildProcessError): - pass + logger.debug("Process already reaped or not found: {}", e) return f"Error: Command timed out after {effective_timeout} seconds" output_parts = []