src/linux/cgroups.cpp
// Mount a cgroups virtual file system (with proper subsystems attached) to a
// given directory (hierarchy root). The cgroups virtual file system is the
// interface exposed by the kernel to control cgroups. Each directory created
// inside the hierarchy root is a cgroup. Therefore, cgroups are organized in a
// tree like structure. User can specify what subsystems to be attached to the
// hierarchy root so that these subsystems can be controlled through normal file
// system APIs. A subsystem can only be attached to one hierarchy. This function
// assumes the given hierarchy is an empty directory and the given subsystems
// are enabled in the current platform.
// @param   hierarchy   Path to the hierarchy root.
// @param   subsystems  Comma-separated subsystem names.
// @return  Some if the operation succeeds.
//          Error if the operation fails.
Mount a cgroups virtual file system (with proper subsystems attached) to a
given directory (hierarchy root). The cgroups virtual file system is the
interface exposed by the kernel to control cgroups. Each directory created
inside the hierarchy root is a cgroup. Therefore, cgroups are organized in a
tree like structure. User can specify what subsystems to be attached to the
hierarchy root so that these subsystems can be controlled through normal file
system APIs. A subsystem can only be attached to one hierarchy. This function
assumes the given hierarchy is an empty directory and the given subsystems
are enabled in the current platform.
Mount a cgroups virtual file system ( with proper subsystems attached ) to a given directory ( hierarchy root ) . The cgroups virtual file system is the interface exposed by the kernel to control cgroups . Each directory created inside the hierarchy root is a cgroup . Therefore cgroups are organized in a tree like structure . User can specify what subsystems to be attached to the hierarchy root so that these subsystems can be controlled through normal file system APIs . A subsystem can only be attached to one hierarchy . This function assumes the given hierarchy is an empty directory and the given subsystems are enabled in the current platform .
static Try<Nothing> mount(const std::string& hierarchy,
                          const std::string& subsystems)
{
  return fs::mount(subsystems, hierarchy, "cgroup", 0, subsystems.c_str());
}
static Try < Nothing > mount ( const std :: string & hierarchy , const std :: string & subsystems ) { return fs :: mount ( subsystems , hierarchy , " " , 0 , subsystems . c_str ( ) ) ; }
Mount a cgroups virtual file system (with proper subsystems attached) to a
given directory (hierarchy root).
Mount a cgroups virtual file system ( with proper subsystems attached ) to a given directory ( hierarchy root ) .