mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-30 01:15:33 -04:00
When a process crash-loops, zmdc's reaper applies exponential backoff
(5s, 10s, 20s, ... up to ZM_MAX_RESTART_DELAY) before restarting it.
However, when a user explicitly issues a restart command (e.g. via
zmdc.pl restart or systemctl restart zoneminder), the accumulated
delay was carried over, causing the process to wait minutes before
restarting despite the explicit request.
Reset $process->{delay} to 0 in restart() so the reaper schedules an
immediate restart. The backoff resets to its initial value of 5s for
any subsequent crashes.
Also make killAll() skip the mandatory sleep(1) + KILL pass when no
ZM processes were found, which avoids a wasted second during clean
startup after a proper shutdown.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>