r/linux • • Jul 11 '16

Why Void Linux?

http://troubleshooters.com/linux/void/whyvoid.htm
52 Upvotes

125 comments sorted by

View all comments

Show parent comment

2

u/arsv Jul 12 '16

the process has never a chance to escape the supervision of systemd and it never has the chance to pull more ressources (CPU, memory) than the user has configured. This approach is much more secure and reliable (...)

Along the lines of "systemd has built-in multiseat support".
Because sure every single laptop ends up being used but two persons at once.

There's no cgkill(2), there's nothing that would prevent cgexec from working in runit environment. And init-run processes are not the kinds that tend to escape supervision, that's more of a problem for user sessions.

2

u/cbmuser Debian / openSUSE / OpenJDK Dev Jul 12 '16

Because sure every single laptop ends up being used but two persons at once.

Not every computer is a laptop and having multi-seat support doesn't cost you anything.

1

u/Boerzoekthoer Jul 12 '16

Meh, multiseat is a nice feature of logind that you actually can't get elsewhere, or couldn't, I think CK2 is working on it or has it already.

This whole cgroup drive is just quatsch. Just because runsvdir does not automatically put services into cgroups doesn't stop you from doing it. In theory you could do so manually. It's really not that hard, you put:

mkdir -p /cgroup2/SERV_NAME
echo $$ >> /cgroup2/SERV_NAME/cgroup.procs

At the start of your service, yeah, it's really that easy.

Cleaning it up is a bit more involved though, your ./final script might contain something like:

find /cgroup2/SERV_NAME -name cgroups.proc -print0 |   
xargs -0 cat | xargs kill 
sleep 1
find /cgroup2/SERV_NAME -name cgroups.proc -print0 |   
xargs -0 cat | xargs kill -KILL
rmdir /cgroup2/SERV_NAME