PEACEFUL systemd thread - GNU/Linux

Users browsing this thread: 4 Guest(s)
z3bra
Grey Hair Nixers
No problem, we're discussing about init systems, which systemd is.
The fact PID 1 cannot die is false. It is a process like any other which is subject to segfaults, oom and the likes. You statement that:

Quote:if the service manager dies (which would not happen with PID1) then all the services will become orphan.

is a bit irrelevant, because it COULD die. If it does, you'll have more problems than sshd not running though, but it could. If you service manager is badly written, and thus die, then moving all this logic to PID 1 won't fix the crashes. It will only weaken PID 1.

As for daemons being orphaned, it shouldn't happen if your daemon manager exits correctly (eg, cleanup by killing all children or whatever). If it does though, then yes, you will have orphaned processes. But it is IMO better than a kernel panic!

Regarding the environment, I agree that it should be reset by the service manager before firing up the service. As for the ID of the service manager, they are technically root:root by default (like PID 1), and each service is free to launch themselves as separate users to drop their privileges.

IMO, there is no valid technical reason to keep service management in PID 1. Not even for orphaned processes, as you will adopt them without any context (it could as well be a simple user process, you can treat all of them as daemons).

To get back to the topic, this is one of the first flaws systemd has regarding service management. The internal logic seems to be okay though, but it is not managed at the good level.


Messages In This Thread
PEACEFUL systemd thread - by z3bra - 30-10-2016, 05:49 AM
RE: PEACEFUL systemd thread - by jkl - 30-10-2016, 01:05 PM
RE: PEACEFUL systemd thread - by pranomostro - 30-10-2016, 05:17 PM
RE: PEACEFUL systemd thread - by venam - 31-10-2016, 03:43 AM
RE: PEACEFUL systemd thread - by z3bra - 31-10-2016, 10:03 AM
RE: PEACEFUL systemd thread - by evbo - 31-10-2016, 01:51 PM
RE: PEACEFUL systemd thread - by z3bra - 02-11-2016, 05:38 AM
RE: PEACEFUL systemd thread - by evbo - 02-11-2016, 03:17 PM
RE: PEACEFUL systemd thread - by z3bra - 03-11-2016, 01:07 PM
RE: PEACEFUL systemd thread - by TheAnachron - 03-11-2016, 01:45 PM
RE: PEACEFUL systemd thread - by josuah - 03-11-2016, 03:11 PM
RE: PEACEFUL systemd thread - by pranomostro - 03-11-2016, 03:32 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 06:16 AM
RE: PEACEFUL systemd thread - by azk - 15-06-2017, 10:06 AM
RE: PEACEFUL systemd thread - by evbo - 15-06-2017, 12:32 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 02:35 PM
RE: PEACEFUL systemd thread - by venam - 15-06-2017, 02:49 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 03:36 PM
RE: PEACEFUL systemd thread - by venam - 15-06-2017, 03:51 PM
RE: PEACEFUL systemd thread - by z3bra - 15-06-2017, 04:02 PM
RE: PEACEFUL systemd thread - by venam - 16-06-2017, 01:01 AM
RE: PEACEFUL systemd thread - by z3bra - 16-06-2017, 05:00 AM
RE: PEACEFUL systemd thread - by venam - 16-06-2017, 07:14 AM
RE: PEACEFUL systemd thread - by z3bra - 16-06-2017, 02:14 PM
RE: PEACEFUL systemd thread - by grah - 26-02-2019, 11:50 PM