mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-12 21:16:16 -04:00
start() blocks SIGCHLD (and since #5199 TERM, INT and ABRT) across the fork. The child unblocks the stop signals, but SIGCHLD stayed blocked through exec, so every daemon zmdc started ran with it blocked (SigBlk 0x10000 in /proc/<pid>/status for zmc, zmfilter, zmstats and zmwatch). Nothing depends on it today, but a daemon that waits for SIGCHLD would never get it. Restore the pre-fork mask just before exec. The reaper took the signal from a wait status as $status & 0xfe, dropping its low bit, so TERM was logged as signal 14, KILL as 8 and SEGV as 10, and the core dump flag as $status & 0x01. Use 0x7f and 0x80. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>