1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #4309 from crosbymichael/change-cgroup-subsystem

Use the cpu cgroup subsystem instead of memory because its non optional
This commit is contained in:
Guillaume J. Charmes 2014-02-24 15:24:51 -08:00
commit b6d4c27fcd

View file

@ -301,9 +301,8 @@ func (d *driver) Info(id string) execdriver.Info {
func (d *driver) GetPidsForContainer(id string) ([]int, error) { func (d *driver) GetPidsForContainer(id string) ([]int, error) {
pids := []int{} pids := []int{}
// memory is chosen randomly, any cgroup used by docker works // cpu is chosen because it is the only non optional subsystem in cgroups
subsystem := "memory" subsystem := "cpu"
cgroupRoot, err := cgroups.FindCgroupMountpoint(subsystem) cgroupRoot, err := cgroups.FindCgroupMountpoint(subsystem)
if err != nil { if err != nil {
return pids, err return pids, err