:: Re: [DNG] Reaping orphan processes.
Top Page
Delete this message
Reply to this message
Author: Rainer Weikusat
Date:  
To: dng
Subject: Re: [DNG] Reaping orphan processes.
Steve Litt <slitt@???> writes:
> Didier Kryn said on Sat, 4 Mar 2023 22:41:49 +0100
>
>>     What init does with zombies
>
> There's no such thing as "init". There are many "init systems", but no
> such thing as "init".


There's absolutely such a thing: init is a UNIX program which has
existed since at least 6th edition UNIX and which would be automatically
started by the kernel after it became ready to handle application
requests:

https://man.cat-v.org/unix-6th/8/init

During the 1980s, development split into a BSD and a SYSV version of
init. Originally, Linux-based systems used the BSD init. Later, it was
replaced by a reimplentation of the SYSV init (more specifically, RedHat
change the init in RedHat Linux from BSD init to the SYSV init clone and
others eventually followed suit).

On Linux, init is a prinicipally arbitrary program whose path is either
compiled into the kernel or passed as command-line parameter, eg, a
system can be booted directly into a shell by using init=/bin/sh or
init=/bin/bash on the kernel command-line.

As usual in the Linux eco-system, all kinds of (often almost ludicrously
complicated) process management systems exist wich usually include their
own init program, although they don't really have to.
?
I also wrote my own init once for a long-dead embedded system of a UTM
appliance. This failed commercial endeavour of my then-employer came to
an end at about the time systemd started to make waves. In intentional
opposition to that, I have since done process management with the help
of a set of fairly small C programs dedicated to individual tasks. The
initial idea was something like "Well, it's claimed that this should be
possible. So, instead reinventing init once again - afterwards judged
not to have been worth the effort (by me) - I'll see how far I get with
the one-tool-per-job appraoch". That was fourteen years ago and I
haven't run into a brick wall with this approach yet.