Process manager: wait and reap finished child handles #63

Closed
opened 2026-08-25 09:19:55 +01:00 by gronod · 0 comments
Owner

Problem

ProcessManager currently polls child.try_wait() in a 100ms interval and never removes finished child processes from its internal map. Cancelling or completing processes (such as chartread) can leave zombie processes or leaked handles that impact stability.

Acceptance Criteria

  1. Async Child Process Waiting \u0026 Cleanup:
    • Replace 100ms polling with an async task awaiting child.wait().
    • Remove child entries from ProcessManager's internal map upon process exit.
    • Ensure clean child termination and handle dropping on explicit kill commands.

Scope Note

  • Parallel task, does not gate v0.2 release unless process handle leakage is detected during dry-run testing.
### Problem `ProcessManager` currently polls `child.try_wait()` in a 100ms interval and never removes finished child processes from its internal map. Cancelling or completing processes (such as `chartread`) can leave zombie processes or leaked handles that impact stability. ### Acceptance Criteria 1. **Async Child Process Waiting \u0026 Cleanup**: - Replace 100ms polling with an async task awaiting `child.wait()`. - Remove child entries from `ProcessManager`'s internal map upon process exit. - Ensure clean child termination and handle dropping on explicit `kill` commands. ### Scope Note - Parallel task, does not gate v0.2 release unless process handle leakage is detected during dry-run testing.
gronod added the Kind/Enhancement label 2026-08-25 09:20:20 +01:00
gronod added this to the Milestone 7: v0.2 ship milestone 2026-08-25 09:44:21 +01:00
gronod changed title from Housekeeping to Process manager: wait and reap finished child handles 2026-08-25 09:48:00 +01:00
Sign in to join this conversation.