mirror of
https://github.com/NixOS/nix.git
synced 2025-11-28 21:21:00 +01:00
Add a setting for enabling cgroups
This commit is contained in:
parent
ff12d1c1a1
commit
67bcb99700
4 changed files with 27 additions and 10 deletions
|
|
@ -401,9 +401,14 @@ static void linkOrCopy(const Path & from, const Path & to)
|
|||
void LocalDerivationGoal::startBuilder()
|
||||
{
|
||||
if ((buildUser && buildUser->getUIDCount() != 1)
|
||||
|| settings.isExperimentalFeatureEnabled(Xp::Cgroups))
|
||||
#if __linux__
|
||||
|| settings.useCgroups
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if __linux__
|
||||
settings.requireExperimentalFeature(Xp::Cgroups);
|
||||
|
||||
auto ourCgroups = getCgroups("/proc/self/cgroup");
|
||||
auto ourCgroup = ourCgroups[""];
|
||||
if (ourCgroup == "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue