Skip to content

Commit 3ed278e

Browse files
committed
Add back cgroups.AddPid
This reverts commit cce5ec8. Note: This has already gone through a revert and re-revert cycle in commits 5273685 and 3fe402b, but that's wrong per: containers/podman#27551 (comment) . Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent e639dec commit 3ed278e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/pkg/cgroups/cgroups_linux.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ func (c *CgroupControl) Update(resources *cgroups.Resources) error {
298298
return man.Set(resources)
299299
}
300300

301+
// AddPid moves the specified pid to the cgroup.
302+
func (c *CgroupControl) AddPid(pid int) error {
303+
path := filepath.Join(cgroupRoot, c.config.Path)
304+
return fs2.CreateCgroupPath(path, c.config)
305+
}
306+
301307
// Stat returns usage statistics for the cgroup.
302308
func (c *CgroupControl) Stat() (*cgroups.Stats, error) {
303309
m := cgroups.Stats{}

0 commit comments

Comments
 (0)