mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-11-07 07:53:09 -05:00
Core kills the plugin script when RUN_TIMEOUT is reached, but not its children. A scan stuck on a busy or wedged radio (seen on a Pi Zero W right after boot) left an orphaned `sudo iw dev wlan0 scan` spinning at ~70% CPU for as long as nobody killed it, slowing the whole host down. The scan used the same timeout as core (RUN_TIMEOUT), so core always won and the plugin's own TimeoutExpired handling never ran. Now `iw` runs under `timeout -s KILL` inside sudo, RUN_TIMEOUT - 15s (min 10s), so it is bounded even if the script itself gets killed, and the plugin logs the timeout before core steps in. Works with the Docker image's sudo shim (busybox timeout) and with real sudo (coreutils timeout). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>