Update module github.com/opencontainers/cgroups to v0.0.8

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2026-07-21 08:50:26 +00:00
committed by GitHub
parent 5defedb11a
commit ae2c27eb07
4 changed files with 21 additions and 4 deletions

2
go.mod
View File

@@ -48,7 +48,7 @@ require (
github.com/nxadm/tail v1.4.11
github.com/onsi/ginkgo/v2 v2.32.0
github.com/onsi/gomega v1.42.1
github.com/opencontainers/cgroups v0.0.7
github.com/opencontainers/cgroups v0.0.8
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.1
github.com/opencontainers/runtime-spec v1.3.0

4
go.sum
View File

@@ -281,8 +281,8 @@ github.com/onsi/ginkgo/v2 v2.32.0 h1:Hw7s2pVrQo/8Yz5N77qdnpHaoc+c6cC9WIV1Jce+J6E
github.com/onsi/ginkgo/v2 v2.32.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
github.com/onsi/gomega v1.42.1 h1:iN1rCUX+44NZ1Dc97MPoeFYbFR0vh8zxoxMFwKdyZ6I=
github.com/onsi/gomega v1.42.1/go.mod h1:REff/hsDsodHoKlWsP2mAPhu1+5/6hVYNf9rIEBpeSg=
github.com/opencontainers/cgroups v0.0.7 h1:FqhggFhigAMgKKwy39jweWX3h7Ha6VBF/qNR6Sso3oc=
github.com/opencontainers/cgroups v0.0.7/go.mod h1:hPBRvnBhLZueEN0eJyozMeM3HeFGYlZW9KnO//px6G4=
github.com/opencontainers/cgroups v0.0.8 h1:dQZyCsB73ggKJUzNl4FLbpvArrLv1tLOjMYPHswdUrI=
github.com/opencontainers/cgroups v0.0.8/go.mod h1:hPBRvnBhLZueEN0eJyozMeM3HeFGYlZW9KnO//px6G4=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=

View File

@@ -1,8 +1,12 @@
package cgroups
import (
"errors"
"io/fs"
"os"
"path/filepath"
"golang.org/x/sys/unix"
)
// GetAllPids returns all pids from the cgroup identified by path, and all its
@@ -11,6 +15,11 @@ func GetAllPids(path string) ([]int, error) {
var pids []int
err := filepath.WalkDir(path, func(p string, d fs.DirEntry, iErr error) error {
if iErr != nil {
// A descendant cgroup can be removed while we walk, ignore
// any such error unless it's on the root (path) cgroup here
if p != path && ignoreCgroupRemoved(iErr) {
return nil
}
return iErr
}
if !d.IsDir() {
@@ -18,6 +27,9 @@ func GetAllPids(path string) ([]int, error) {
}
cPids, err := readProcsFile(p)
if err != nil {
if p != path && ignoreCgroupRemoved(err) {
return nil
}
return err
}
pids = append(pids, cPids...)
@@ -25,3 +37,8 @@ func GetAllPids(path string) ([]int, error) {
})
return pids, err
}
// ignoreCgroupRemoved reports whether err indicates the cgroup was removed.
func ignoreCgroupRemoved(err error) bool {
return os.IsNotExist(err) || errors.Is(err, unix.ENODEV)
}

2
vendor/modules.txt vendored
View File

@@ -479,7 +479,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge
github.com/onsi/gomega/matchers/support/goraph/node
github.com/onsi/gomega/matchers/support/goraph/util
github.com/onsi/gomega/types
# github.com/opencontainers/cgroups v0.0.7
# github.com/opencontainers/cgroups v0.0.8
## explicit; go 1.24.0
github.com/opencontainers/cgroups
github.com/opencontainers/cgroups/devices/config