diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-11-28 21:54:02 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-11-28 21:54:02 +0100 |
commit | 67bcb99700a0da1395fa063d7c6586740b304598 (patch) | |
tree | c107e85165ddee11cecfce5f6c10dea3a2971318 /src/libstore/build/local-derivation-goal.cc | |
parent | ff12d1c1a1bb0dcea5a9ac6b8a5036d7e5dc11ca (diff) |
Add a setting for enabling cgroups
Diffstat (limited to 'src/libstore/build/local-derivation-goal.cc')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index d44694890..69a7df411 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -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 == "") |