diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-04-07 12:21:31 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-04-07 12:21:31 +0200 |
commit | 8a29052cb2f52ef2c82c36fb3818fd0f66349729 (patch) | |
tree | bbd3b3c11f2876efa14b34e40e1451050c3dce73 /src/libstore/build/worker.cc | |
parent | 4bf3eb27e6e2c0cdac862d188b23342793180999 (diff) |
PathSubstitutionGoal: Clean up pipe
If there were many top-level goals (which are not destroyed until the
very end), commands like
$ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' \
/run/current-system --no-check-sigs --substitute-on-destination
could fail with "Too many open files". So now we do some explicit
cleanup from amDone(). It would be cleaner to separate goals from
their temporary internal state, but that would be a bigger refactor.
Diffstat (limited to 'src/libstore/build/worker.cc')
-rw-r--r-- | src/libstore/build/worker.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 6c04d3ed3..0f2ade348 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -128,6 +128,7 @@ void Worker::removeGoal(GoalPtr goal) nix::removeGoal(subGoal, drvOutputSubstitutionGoals); else assert(false); + if (topGoals.find(goal) != topGoals.end()) { topGoals.erase(goal); /* If a top-level goal failed, then kill all other goals |