* setpgrp() is not POSIX (and on Mac OS X it's different than on

Linux), so use setpgid().
This commit is contained in:
Eelco Dolstra 2004-05-18 09:45:18 +00:00
parent ace8872706
commit 8e9fd57ef9

View file

@ -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)