mirror of
https://github.com/opencontainers/runc.git
synced 2025-12-24 11:50:58 +08:00
It makes sense to make runc exec benefit from clone2(CLONE_INTO_CGROUP),
if it is available. Since it requires a recent kernel and might not work,
implement a fallback to older way of joining the cgroup.
Based on:
- https://go-review.googlesource.com/c/go/+/417695
- https://github.com/coreos/go-systemd/pull/458
- https://github.com/opencontainers/cgroups/pull/26
- https://github.com/opencontainers/runc/pull/4822
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 5af4dd4e64)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>