Example #1
0
// Same as CreateFromParent(), but all errors are ignored when setting
// owner of the group and/or its tasks file.
func (cg Cgroup) CreateFromParentIgnoreOwnership() error {
	return _err(C.cgroup_create_cgroup_from_parent(cg.g, C.int(1)))
}
Example #2
0
// Physically create new control group in kernel, with all parameters and values
// copied from its parent group. The group is created in all hierarchies, where
// the parent group exists. I.e. following code creates subgroup in all
// hierarchies, because all of them have root (=parent) group.
//
//   foo = cgroup.NewCgroup("foo)
//   foo.CreateFromParent()
func (cg Cgroup) CreateFromParent() error {
	return _err(C.cgroup_create_cgroup_from_parent(cg.g, C.int(0)))
}