:: Re: [DNG] Systemd through the eyes …
Góra strony
Delete this message
Reply to this message
Autor: Lorenz
Data:  
Dla: Martin Steigerwald
CC: dng
Temat: Re: [DNG] Systemd through the eyes of a musl distribution maintainer - Runit missing from the picture (was: Re: I think you guys just might like my linkedin post
Hi,

Il giorno dom 17 mar 2024 alle ore 20:46 Martin Steigerwald
<martin@???> ha scritto:
>
> Steve Litt - 17.03.24, 20:18:02 CET:
> > >With runit you also know which
> > >processes belong to a service
> >
> > I didn't know that. I thought a runsv spawned exactly one process. Of
> > course that process is free to spawn other processes.
>
> Well you could just traverse the tree of child processes like pstree does?


That doesn't always work: if your service forks processes in background
they are reparented to PID 1; we use the -P option of runsvdir, so you can
use session ID and group ID to track a detached process, but if such process
"daemonize" (double forks and creates a new session for itself) than you can't
track it that way.

needless to say that systemd conflates 3 different things into one:
supervision + process tracking + process resource limits

with runit, by default you have supervision, some optional process tracking
(see above) and some optional resource limit (with chpst); however one can
always use cgroup with runit to contain a service (for example with cgexec
or a shell hack [1]), if it's really needed..

Lorenzo
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923449

>
> --
> Martin
>
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng