Allow forking sysv/services like podman to move between cgroups

The container monitor that podman forks off when starting a container
instance creates subgroups in the cgroup v2 hieararchy that we want to
reuse.  This patch adds cgroup_move_svc() which we call from the pidfile
plugins to relocate the conmon process.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-12-15 22:04:32 +01:00
1 parent 567c695954
commit e756d6f8ac
3 files changed
+131

No files matched your search

+3
View File
@@ -53,4 +53,7 @@ char *cgroup_svc_name(svc_t *svc, char *buf, size_t len);
int cgroup_prepare (svc_t *svc, const char *name);
int cgroup_watch (const char *group, const char *name);
int cgroup_move_pid(const char *group, const char *name, int pid, int delegate);
int cgroup_move_svc(svc_t *svc);
#endif /* FINIT_CGROUP_H_ */