Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(shell): reap zombie processes when command timeout kills subprocess
Eric Yange423ceef9c70
diff --git a/nanobot/agent/tools/shell.py b/nanobot/agent/tools/shell.pyindex 4b10c83a3..999668448 100644--- a/nanobot/agent/tools/shell.py+++ b/nanobot/agent/tools/shell.py@@ -109,6 +109,11 @@ class ExecTool(Tool):try:await asyncio.wait_for(process.wait(), timeout=5.0)except asyncio.TimeoutError:+ try:+ os.waitpid(process.pid, os.WNOHANG)+ except (ProcessLookupError, ChildProcessError):+ pass+ except ProcessLookupError:passreturn f"Error: Command timed out after {effective_timeout} seconds"