mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
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:
1 parent
85261c9acd
commit
f51fde4d46
8 files changed
+267
-1
No files matched your search
@@ -36,6 +36,7 @@
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "cgroup.h"
|
||||
#include "cond.h"
|
||||
#include "conf.h"
|
||||
#include "helpers.h"
|
||||
@@ -352,6 +353,11 @@ int main(int argc, char* argv[])
|
||||
if (fisdir("/proc/bus/usb"))
|
||||
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
|
||||
|
||||
/*
|
||||
* Initialize default control groups, if available
|
||||
*/
|
||||
cgroup_init();
|
||||
|
||||
/*
|
||||
* Parse kernel command line (debug, rescue, splash, etc.)
|
||||
* Also calls log_init() to set correct log level
|
||||
|
||||
Reference in new issue
Block a user