mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Merge pull request #5728 from openSUSE/pids.current
Do not error on pids.current stats if ctr.path is empty
This commit is contained in:
@ -44,8 +44,12 @@ func (c *pidHandler) Destroy(ctr *CgroupControl) error {
|
||||
|
||||
// Stat fills a metrics structure with usage stats for the controller
|
||||
func (c *pidHandler) Stat(ctr *CgroupControl, m *Metrics) error {
|
||||
var PIDRoot string
|
||||
if ctr.path != "" {
|
||||
// nothing we can do to retrieve the pids.current path
|
||||
return nil
|
||||
}
|
||||
|
||||
var PIDRoot string
|
||||
if ctr.cgroup2 {
|
||||
PIDRoot = filepath.Join(cgroupRoot, ctr.path)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user