Merge pull request #966 from sjenning/fix-initscope-cgroup-path

fix init.scope in cgroup paths
This commit is contained in:
Mrunal Patel 2016-08-01 14:29:47 -07:00 committed by GitHub
commit 56fc0ac9ce
1 changed files with 2 additions and 0 deletions

View File

@ -388,6 +388,8 @@ func getSubsystemPath(c *configs.Cgroup, subsystem string) (string, error) {
if err != nil {
return "", err
}
// if pid 1 is systemd 226 or later, it will be in init.scope, not the root
initPath = strings.TrimSuffix(filepath.Clean(initPath), "init.scope")
slice := "system.slice"
if c.Parent != "" {