Re: rcd(8) - new service manager daemon

Tomoaki AOKI <[email protected]> Mon, 15 Jun 2026 20:29:13 +0900
Newsgroups gmane.os.freebsd.devel.hackers
Organization Junchoon corps
Message-ID <[email protected]>
On Mon, 15 Jun 2026 10:54:47 +0200
Baptiste Daroussin <[email protected]> wrote:

> On Mon 15 Jun 10:52, Dag-Erling Smørgrav wrote:
> > Baptiste Daroussin <[email protected]> writes:
> > > - 2 (later): Commit init(8) changes to call rcd when present (falling
> > >   back to /etc/rc otherwise).  Provide a /etc/rc wrapper that invokes
> > >   rcd for systems that want to switch.
> > 
> > I think that ultimately rcd should _be_ init, and should support
> > systemd-style services (where the service doesn't daemonize and logs to
> > stderr).  I haven't looked at the code, but I suspect that very little
> > is missing to make that possible: rcd needs to be prepared to reap
> > processes it didn't fork, and it needs to be able to read /etc/ttys and
> > manage ttys (which aren't much different from any other service).
> 
> I don't see why it should be init, but that can be discussed.
> 
> rcd knows how to reap processes it didn't fork and does it already.
> It knows how to daemonize services which doesn't daemonize themselves.
> 
> Best regards,
> Bapt

If there are any issues with systemd because of its pid being 0
on Linux, rcd would better NOT replacing init on FreeBSD not to
become pid 0.

But it would be worth discussing whether init should invoke
both rcd and sh or invoke only rcd and let rcd to invoke sh,
or invoke only sh and let sh to invoke rcd.

It may matter on single user mode.

Regards.

-- 
Tomoaki AOKI    <[email protected]>