CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/10/09 00:25:07
Modified files:
etc/rc.d : rc.subr
Log message:
Randonly, when starting a daemon that sets rc_bg=YES, we may end up with:
/etc/rc.d/foo: kill: 123456: no such process
There's a race in the rc.subr(8) system where we can end up killing a non
existing process (which PID may already be reused by another one).
The reason is that rc_alarm timer sends a SIGALRM to all children of rc_cmd to
detach rc_start. But the timer is also a child... and can then die while
rc_cmd() is about to kill it; that's when you get the error (as it's already
gone).
Re-implement so the timer ignore SIGALRM and let it get killed by rc_cmd.
My tests confirm this fixes the issue, so commit it early in the release
process to make sure this does not introduce any regression.
reported on bugs@ by adfsilva at gmail dot com
ok kn@