about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/normalise.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/normalise.cc b/src/libstore/normalise.cc
index 341234d663c8..7498ef20fd95 100644
--- a/src/libstore/normalise.cc
+++ b/src/libstore/normalise.cc
@@ -806,7 +806,7 @@ void Normaliser::initChild(Goal & goal)
 {
     /* Put the child in a separate process group so that it doesn't
        receive terminal signals. */
-    if (setpgrp() == -1)
+    if (setpgid(0, 0) == -1)
         throw SysError(format("setting process group"));
 
     if (chdir(goal.tmpDir.c_str()) == -1)