Linux
19 Sep 2026
4 min read
CLONE_INTO_CGROUP Places a Child in Its Target cgroup at Creation
CLONE_INTO_CGROUP Places a Child in Its Target cgroup at Creation A process created in one cgroup and moved to another has a short but real interval in the original cgroup. During that interval, accounting, resource controls, and freezer state come from the initial placement rather than the destination. Linux provides CLONE_INTO_CGROUP so clone3() can place the child in a cgroup v2 target as part of process creation. This changes the placement boundary. Instead of creating a task and repairing its cgroup membership afterward, the caller identifies the destination before the child exists.