Files
RedBear-OS/local
vasilito 509552725f driver-manager: crash-aware reap + error_channel fd cleanup (N18 Q2+Bug4)
Splits `reap_pid` into the `reap_pid_inner(crashed: bool)` private
helper plus two public entry points:

- `reap_pid(pid)` — crash path. Calls
  `crash_tracker().record_failure` after the maps are cleared,
  which advances the auto-blacklist counter.

- `reap_pid_clean(pid)` — clean exit path. Calls
  `crash_tracker().record_success` so the device's backoff is
  reset; a future crash starts the count from 1, not from
  where the previous clean-exit backoff ended.

Both paths also call `error_channel::global().remove(&key)` to
close the sidecar UnixStream fd (Bug4: each crash previously
leaked one fd; ~1024 crashes exhausted the manager's fd table).

This is the kernel of N18-Q2+Bug4; the call-site change in
`main.rs` that interprets the waitpid status was committed in
the prior Q1+Q2+S3 commit.
2026-07-27 21:56:37 +09:00
..