refactor(shell): use finally block to reap zombie processes on timeoutx

This commit is contained in:
Eric Yang authored and Xubin Ren committed 2026-03-24 00:02:49 +08:00
1 parent dbcc7cb539
commit e2e1c9c276
1 file changed
+1 -1
+1 -1
View File
@@ -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 = []