func (cgroup *CgroupResource) Cleanup() error {
	err := cgroup.control.Remove(cgroup.cgroupRoot)
	// Explicitly handle cgroup deleted error
	if err != nil {
		if err == cgroups.ErrCgroupDeleted {
			seelog.Warnf("Cgroup at %s has already been removed: %v", cgroup.cgroupRoot, err)
			return nil
		}
		return errors.Wrapf(err, "resource: cleanup cgroup: unable to remove cgroup at %s", cgroup.cgroupRoot)
	}
	return nil
}
func (cgroup *CgroupResource) Cleanup() error {
	err := cgroup.control.Remove(cgroup.cgroupRoot)
	
	if err != nil {
		if err == cgroups.ErrCgroupDeleted {
			seelog.Warnf("Cgroup at %s has already been removed: %v", cgroup.cgroupRoot, err)
			return nil
		}
		return errors.Wrapf(err, "resource: cleanup cgroup: unable to remove cgroup at %s", cgroup.cgroupRoot)
	}
	return nil
}
func ( cgroup * CgroupResource ) Cleanup ( ) error { err := cgroup . control . Remove ( cgroup . cgroupRoot ) // Explicitly handle cgroup deleted error if err != nil { if err == cgroups . ErrCgroupDeleted { seelog . Warnf ( " " , cgroup . cgroupRoot , err ) return nil } return errors . Wrapf ( err , " " , cgroup . cgroupRoot ) } return nil }
// Cleanup removes the cgroup root created for the task
Cleanup removes the cgroup root created for the task