summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nix/libstore/build.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 74cd05417f..c4fc87746a 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -947,6 +947,11 @@ void DerivationGoal::killChild()
assert(pid == -1);
}
+ /* If there was a build hook involved, remove it from the worker's
+ children. */
+ if (hook && hook->pid != -1) {
+ worker.childTerminated(hook->pid);
+ }
hook.reset();
}