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
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
ProcessManagercurrently pollschild.try_wait()in a 100ms interval and never removes finished child processes from its internal map. Cancelling or completing processes (such aschartread) can leave zombie processes or leaked handles that impact stability.Acceptance Criteria
child.wait().ProcessManager's internal map upon process exit.killcommands.Scope Note
Housekeepingto Process manager: wait and reap finished child handles