Ejemplo n.º 1
0
// Same as Create(), but all errors are ignored when setting
// owner of the group and/or its tasks file.
func (cg Cgroup) CreateIgnoreOwnership() error {
	return _err(C.cgroup_create_cgroup(cg.g, C.int(1)))
}
Ejemplo n.º 2
0
// Physically create a control group in kernel. The group is created in all
// hierarchies, which cover controllers added by Cgroup.AddController().
//
// TODO correct docs for golang implementation
//
// All parameters set by cgroup_add_value_* functions are written.
// The created groups has owner which was set by cgroup_set_uid_gid() and
// permissions set by cgroup_set_permissions.
//
//   foo = cgroup.NewCgroup("foo)
//   foo.Create()
func (cg Cgroup) Create() error {
	return _err(C.cgroup_create_cgroup(cg.g, C.int(0)))
}