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
View File
@@ -32,6 +32,7 @@
#include <termios.h>
#include "finit.h"
#include "cgroup.h"
#include "helpers.h"
#include "sig.h"
#include "utmp-api.h"
@@ -192,6 +193,7 @@ static int do_login(char *name)
{
struct stat st;
cgroup_user(name);
execl(_PATH_LOGIN, _PATH_LOGIN, name, NULL);
/*