:: Re: [DNG] Reaping orphan processes.
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
To: dng
Subject: Re: [DNG] Reaping orphan processes.
Le 07/03/2023 à 23:51, capercally.bleery670@??? a écrit :
> On Tue, Mar 07, 2023 at 03:22:53PM +0000, Rainer Weikusat via Dng wrote:
>>> Traditionally, this type of daemon would remain in foreground until it
>>> was functional, and then doublefork itself, at which time sysvinit
>>> would run the next daemon.
>> That's an urban myth. There is no such convention and "daemon readiness"
>> isn't a well-defined concept. Current implementations of SysV-RC start
>> jobs in parallell (and have for some time).
> The traditional symlinks and sequence numbers are still there, though.
> What purpose do they serve, then? At what point does rc proceed from
> handling /etc/rc2.d/S02unbound to /etc/rc2.d/S03cron ? (or is there such
> a distinct point at all?)

    Symlinks are intermediaries used ot handle the "system levels".
Sysvinit manages a number of system levels from 0 to 6, each of which is
dedicated to some mode of operation. Some services are started when
entering a run level and some are stopped when quitting it. Each rcx.d
directory contains S symlinks to start services and K symlinks to stop
them. The numbers tell the order but are convoluted with the comments in
the header of the scripts which is a meta-language explicitating their
relationships. All this is a big crap, but still works.

    More explanations on run levels can be found on the web and from
the init man page. My opinion is that run levels are now useless; they
are a relic. Busybox's init is very similar to Sysvinit, with also an
inittab config file, but without run levels.

--     Didier