Initial support for cgroups

Similar to how systemd creates cgroups for all services, for purposes of
tracking, Finit now does the same.  We also mount all available cgroups
in the /sys/fs/cgroup namespace.

This patch adds support for grouping processes in logical cgroups, like
systemd, and an `initctl ps` command to list the hieararchy.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2019-02-05 18:35:36 +01:00
1 parent 85261c9acd
commit f51fde4d46
8 files changed
+267 -1

No files matched your search

+2 -1
View File
@@ -10,6 +10,7 @@ endif
bin_PROGRAMS = logit
sbin_PROGRAMS = finit initctl reboot
pkglibexec_SCRIPTS = cgreaper.sh
if WATCHDOGD
pkglibexec_PROGRAMS = watchdogd
endif
@@ -17,7 +18,7 @@ endif
logit_SOURCES = logit.c
logit_CFLAGS = -W -Wall -Wextra -Wno-unused-parameter -std=gnu99
finit_SOURCES = api.c \
finit_SOURCES = api.c cgroup.c cgroup.h \
cond.c cond-w.c cond.h \
telinit.c \
conf.c conf.h \