What does HackerNews think of systemd?

The systemd System and Service Manager

Language: C

#43 in C
#87 in Linux
Systemd is certainly not implemented in c++. I don’t think many of the authors are even well familiarized with the language. Look at the chart at the bottom of the project page.

https://github.com/systemd/systemd

Wikipedia: https://en.wikipedia.org/wiki/Systemd

Web: https://systemd.io/

Src: https://github.com/systemd/systemd

Systemd manpage index: https://www.freedesktop.org/software/systemd/man/

https://www.freedesktop.org/software/systemd/man/systemd.htm... :

  man 1 systemd
  man systemd
  man init
...:

  man systemctl
  man journalctl
  
  man systemd.timer
  man systemd-resolved
The Arch Linux wiki docs for systemd are succinct: https://wiki.archlinux.org/title/systemd

Fedora docs > "Understanding and administering systemd" https://docs.fedoraproject.org/en-US/quick-docs/understandin...

RHEL7 System Administrator’s Guide > "Chapter 10. Managing Services with SystemD" https://access.redhat.com/documentation/en-us/red_hat_enterp...

For many of us, our biggest beef with systemd is that it has no planned limitations to its scope. (This has already been discussed to death so I will try to be brief.) Let's look at the actual current code size. I just cloned the systemd Github repo (git clone https://github.com/systemd/systemd.git) and this is what I got:

    $ wc `find . \( -name \*.c -o -name \*.h \) -print`
    [ ... ]
            37       89     1100 ./src/xdg-autostart-generator/xdg-autostart-service.h
    677446  2077830 23953433 total
(Simple wc includes blank lines and comment lines and we could be fancier but wc will do.) Now compare the same thing with OpenRC (git clone https://github.com/OpenRC/openrc):

   $ wc `find . \( -name \*.c -o -name \*.h \) -print`
    [ ... ]
      56    242   2209 ./src/rc/_usage.h
   17263  53243 419162 total
So 677,446 lines vs. 17,263 lines.

Lennart just keeps adding to systemd and refuses to say when he will finally stop adding to it. How many skilled humans on this planet are available to audit those 600k+ lines of systemd code and are actually auditing it? (And how many work for intelligence agencies?)

> but I do think that having its design and implementation centralized within Red Hat

oh don't be silly.

systemd's development is not centralized at all.

it's LGPL licensed and its developent happens on github at https://github.com/systemd/systemd -- anybody is free to fork it off to another project -- yet pretty much nobody does, how comes that?

> Also check github for a bunch of repos that contain biolerplate code that is used in most deamons illustrating signal handling, forking, etc.[2]

docker-systemctl-replacement is a (partial) reimplementation of systemd as one python script that can be run as the init process of a container that's helpful for understanding how systemd handles processes: https://github.com/gdraheim/docker-systemctl-replacement/blo...

systemd is written in C: https://github.com/systemd/systemd

> examples of how to write secure code

awesome-safety-critical > Coding Guidelines https://github.com/stanislaw/awesome-safety-critical/blob/ma...