mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1305] leonida_tui: terminate only the timed-out child in pump_process (TUI-PUMP-PROCESS-TIMEOUT) #1335
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1335
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1305
Author: @ambroseautomation
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/tui-pump-process-timeout📝 Commits (1)
2be1e56leonida_tui: terminate only the timed-out child in pump_process📊 Changes
2 files changed (+130 additions, -23 deletions)
View changed files
📝
tests/test_leonida_tui.py(+102 -0)📝
tools/leonida_tui.py(+28 -23)📄 Description
Summary
Coordination item:
TUI-PUMP-PROCESS-TIMEOUT(reported by@jtoucas-DIMOin #14).Problem & Root Cause
In
tools/leonida_tui.py,pump_process()waits up to0.5sforprocto exit after itsstdoutreaches EOF. Onsubprocess.TimeoutExpired, it calledkill_live_processes(), which iterates over the global_live_procsset and kills every monitored subprocess (and clears_live_procs), terminating unrelated parallel workers (such as concurrent shader shards or overlapped build stages) whenever one child lingers after closing stdout.Implementation
_terminate_process(proc)fromkill_live_processes()intools/leonida_tui.py(preserving Windowstaskkill /F /T /PIDtree termination and POSIXterminate()→wait(1.0)→kill()fallback).pump_process()to call_terminate_process(proc)on post-EOFsubprocess.TimeoutExpiredinstead ofkill_live_processes(), so only the timed-out child is terminated and later unregistered infinally, while sibling live processes remain running and registered.PumpProcessTimeoutTestintests/test_leonida_tui.pycovering both POSIX (terminate()) and Windows (taskkill /F /T /PID) paths with a registered sibling process.Tests Run
Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic
FakeProcfixtures only (no game data).python -I -m py_compile tools/leonida_tui.py tests/test_leonida_tui.py— PASSpython -I tests/test_leonida_tui.py -v— 27/27 PASS (including 2 new tests inPumpProcessTimeoutTest)pytest tests/test_leonida_tui.py tests/test_text_write_line_endings.py -v— 30/30 PASSpython -I scripts/check_no_game_data.py tools/leonida_tui.py tests/test_leonida_tui.py— PASSDisclosure
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.