HomeFreeBSD

ctld: Move the pidfile handle out to a global variable

Description

ctld: Move the pidfile handle out to a global variable

This ensures it will be destroyed (removing the associated pidfile)
anytime the process exits, including from exit(3) calls. This fixes
a few places that would "leak" the pidfile on certain errors.

This also removes the need for some convoluted logic where
configuration objects would hand-off ownership of the pidfile handle
from the old configuration to the new configuration.

Reviewed by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D56527

Details

Provenance
jhbAuthored on Apr 23 2026, 7:17 PM
Reviewer
asomers
Differential Revision
D56527: ctld: Move the pidfile handle out to a global variable
Parents
rG3df5cc33d894: ctld: Ports without a portal group are not dummy ports
Branches
Unknown
Tags
Unknown