mirror of
https://github.com/containers/podman.git
synced 2025-09-17 15:07:40 +08:00
vendor containerd/cgroups
We need to vendor in the latest containerd/cgroups for a fix related to slice delegation and systemd <= 239. The opencontainer/runtime-spec is brought along for the ride. Signed-off-by: baude <bbaude@redhat.com> Closes: #1414 Approved by: mheon
This commit is contained in:
21
vendor/github.com/containerd/cgroups/control.go
generated
vendored
21
vendor/github.com/containerd/cgroups/control.go
generated
vendored
@ -1,3 +1,19 @@
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package cgroups
|
||||
|
||||
import (
|
||||
@ -8,6 +24,7 @@ import (
|
||||
|
||||
const (
|
||||
cgroupProcs = "cgroup.procs"
|
||||
cgroupTasks = "tasks"
|
||||
defaultDirPerm = 0755
|
||||
)
|
||||
|
||||
@ -32,8 +49,10 @@ type Process struct {
|
||||
type Cgroup interface {
|
||||
// New creates a new cgroup under the calling cgroup
|
||||
New(string, *specs.LinuxResources) (Cgroup, error)
|
||||
// Add adds a process to the cgroup
|
||||
// Add adds a process to the cgroup (cgroup.procs)
|
||||
Add(Process) error
|
||||
// AddTask adds a process to the cgroup (tasks)
|
||||
AddTask(Process) error
|
||||
// Delete removes the cgroup as a whole
|
||||
Delete() error
|
||||
// MoveTo moves all the processes under the calling cgroup to the provided one
|
||||
|
Reference in New Issue
Block a user