[systemd-devel] SysVInit service migration to systemd

Mantas Mikulėnas grawity at gmail.com
Mon Jun 29 07:50:36 PDT 2015


On Jun 29, 2015 16:58, "Lesley Kimmel" <ljkimmel99 at hotmail.com> wrote:
>
> Jonathan;
>
> Thanks for the background and information. Since you clearly seem to have
a grasp of systemd please humour me with a few more questions (some of them
slightly ignorant):
>
> a) Why are PID bad?
> b) Why are lock files bad?
> c) If a/b are so bad why did they persist for so many years in SysVInit?

init itself *doesn't need* either, though it only supports non-forking
services, and in practice the only service it ever manages is agetty. (And
sometimes xdm.)

But the init.d scripts, they're just she'll scripts which aren't capable of
any persistent monitoring. They cannot rely on pid1 to do any monitoring.
So pidfiles and lockfiles are the only (or at least the simplest) way for
these scripts keep state from "init.d/foo start" across to "init.d/foo
stop".

Personally I would say they persisted in sysvinit because they pretty much
/define/ the sysvinit design (i.e. pid1 that does almost nothing, and
short-lived external scripts).

Though there's also openrc, which also runs on top of sysv pid1, but that's
really all I know about it. I wonder how it tracks processes. I heard it
uses cgroups?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150629/68301358/attachment.html>


More information about the systemd-devel mailing list