systemd: please stop trying to take over the world :)
dvlasenk at redhat.com
Tue Jun 14 11:55:08 UTC 2011
On Tue, 2011-06-14 at 12:53 +0200, Lennart Poettering wrote:
> daemontools can be set up in a way than most init scripts are
> > no longer necessary. It also achieves parallelized start.
> This is bogus.
Amazingly deep argument. Can you do better than this?
> > > > > Hmm? systemd is an init system, so it is of course PID 1.
> > > >
> > > > Again. *Why it has to have PID 1* to spawn and control services?
> > > > Can you please answer this?
> > >
> > > Yupp, read up on Unix. Only PID 1 gets SIGCHLD for daemonized
> > > processes.
> > Why service daemon needs to receive death notifications from daemonized
> > processes?
> To be able to supervise them? That's a key feature of supervision of
> services: that you know when a daemon is gone, and know the exit code
> and whether it crashed or not.
This is bogus (c) Lennart.
You can't know that because you have no idea that dead process with pid
N is a daemon you started for service FOO. Because when you started it,
its pid was not N (if it really did daemonize).
With sufficient amount of nutty hackery it may be possible to figure is
out, but it will be either racy, or will require labeling (process
groups? session ids? cgroups?) which, in general, is not reliable:
processes can escape from that.
Much saner solution is to simply require controlled processes to not
daemonize. (Today it is a common practice to equip every daemon with a
"don't daemonize" switch for this, so it's not a problem.) This way,
service management tool will get death notifications in a natural way,
via its parent-child relationship with the service process.
More information about the devel