:: Re: [DNG] Reaping orphan processes.
Página Inicial
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
Para: dng
Assunto: Re: [DNG] Reaping orphan processes.
Didier Kryn said on Mon, 6 Mar 2023 12:27:59 +0100

>Le 06/03/2023 à 00:12, Steve Litt a écrit :
>> Rainer Weikusat via Dng said on Sun, 05 Mar 2023 19:31:09 +0000
>>
>>> Steve Litt <slitt@???> writes:
>>
>     I think we are sharing the opinion that daemon management should
> be
>kept out of the proper job of Pid1. The first massive regression of
>Systemd is to include it (due to the hidden goal of locking down the
>OS). I think the emerging conception is that daemon management should
>be handled by a dedicated service which is started by Pid1.


My personal preference would be to separate daemon management (and
initial instantiation of things like dbus) from PID1.

>
>     Sophisticated daemon management is too complex and does not need
> to
>be included in Pid1. This management has been made even easier since
>kernel version 3.4 with the concept of subreaper. At the maximum, Pid1
>might monitor the daemon manager, like Sysvinit uses to manage getty.


AFAIK runit just listens for signals, acts as PID1, and forks off all
other duties, which is what I prefer. Runit *might* do early
instantiations as a one-time part of PID1 before it loops to listen for
signals, but daemon supervision is definitely forked off.

s6' PID1 contains a very simple supervisor that supervises only one
thing: The daemon supervisor. The benefit is that if the daemon
supervisor crashes, PID1 reruns it. But s6' PID1 does not deal with
things like smbd or gettys or httpd. So it's close to what we're both
calling ideal.

>
>     AFAIU s6-rc and openrc aren't meant to be Pid1. In this spirit,
>there is no real need to replace Sysvinit, which has demonstrated
>extremely high reliability and is perfectly able to monitor any daemon
>manager if this is ever necessary; replacing it is essentially an
>exercise of style; only the replacement of the Sysv-RC machinery is
>usefull.


I think what I'm hearing you say is to use sysvinit as PID1, and from
/etc/inittab just fork off an init script that does instantiation
(including a very early getty), and then exec's the daemon supervisor of
runit or s6 or even daemontools-encore. If that's what you're saying,
yes, for years I've been recommending that as a stepping stone to pure
runit or s6.

SteveT

Steve Litt
Autumn 2022 featured book: Thriving in Tough Times
http://www.troubleshooters.com/bookstore/thrive.htm