mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
Merge pull request #1387 from avagin/freezer
Don't try to read freezer.state from the current directory
This commit is contained in:
@@ -1383,7 +1383,12 @@ func (c *linuxContainer) runType() (Status, error) {
|
||||
}
|
||||
|
||||
func (c *linuxContainer) isPaused() (bool, error) {
|
||||
data, err := ioutil.ReadFile(filepath.Join(c.cgroupManager.GetPaths()["freezer"], "freezer.state"))
|
||||
fcg := c.cgroupManager.GetPaths()["freezer"]
|
||||
if fcg == "" {
|
||||
// A container doesn't have a freezer cgroup
|
||||
return false, nil
|
||||
}
|
||||
data, err := ioutil.ReadFile(filepath.Join(fcg, "freezer.state"))
|
||||
if err != nil {
|
||||
// If freezer cgroup is not mounted, the container would just be not paused.
|
||||
if os.IsNotExist(err) {
|
||||
|
||||
Reference in New Issue
Block a user