mirror of
https://github.com/troglobit/finit.git
synced 2026-10-25 12:04:36 +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
@@ -32,6 +32,7 @@
|
||||
#include <net/if.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "cgroup.h"
|
||||
#include "conf.h"
|
||||
#include "cond.h"
|
||||
#include "finit.h"
|
||||
@@ -185,6 +186,8 @@ static int service_start(svc_t *svc)
|
||||
sigprocmask(SIG_BLOCK, &nmask, &omask);
|
||||
|
||||
pid = fork();
|
||||
cgroup_service(svc->cmd, pid);
|
||||
|
||||
if (pid == 0) {
|
||||
int status;
|
||||
char *home = NULL;
|
||||
|
||||
Reference in new issue
Block a user