about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-05-18T09·45+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-05-18T09·45+0000
commit8e9fd57ef9aa47214418212916e54c5644721335 (patch)
tree25ebbc7e138298d4a10ef13a770160a75d355573 /src
parentace8872706a1ddbefde39ee66f0746df6861cc11 (diff)
* setpgrp() is not POSIX (and on Mac OS X it's different than on
  Linux), so use setpgid().

Diffstat (limited to 'src')
-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)