The rc system fully detaches it from the entire call stack, in the end it just looks like init ran the daemon.  The rc system is really just a series of shell scripts, nothing too fancy.  That's why PID files are so important, the rc system uses those to figure out which PID to send signals to.

Fri Sep 01 2023 16:40:26 EDT from IGnatius T Foobar Subject: Re: Removed background and restart from citserver.
I have to go examine other BSD rc scripts, but I'm guessing they simply do "&" to put a process in the background, and then they keep track of the pid so they can SIGTERM it later.

 

Reply via email to